ij.gui.Toolbar.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中ij.gui.Toolbar.<init>()方法的一些代码示例,展示了Toolbar.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Toolbar.<init>()方法的具体详情如下:
包路径:ij.gui.Toolbar
类名称:Toolbar
方法名:<init>

Toolbar.<init>介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

var Toolbar = function () {
  var toolbar = this;  // toolbar = Toolbar instance
  this.attr1 = "";     // this = Toolbar instance

  this.Comment = function () {
    this.attr1 = toolbar.attr1;  // this = Comment instance;
  };
};

var toolbar1 = new Toolbar();
var comment = new toolbar1.Comment();

代码示例来源:origin: stackoverflow.com

public WebPanel()
{
  this.toolbar= new Toolbar(this); 
}
webPanel = new WebPanel();
webPanel.getToolbar() ;

代码示例来源:origin: stackoverflow.com

setContentView(R.layout.activity_setting);
rootLayout = (RelativeLayout) findViewById(R.id.settingRootLayout);
mToolbar = new Toolbar(this);
mToolbar.setLayoutParams(
    new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));

代码示例来源:origin: stackoverflow.com

Toolbar toolbar = new Toolbar(this);
Toolbar.LayoutParams toolBarParams = new Toolbar.LayoutParams(
        Toolbar.LayoutParams.MATCH_PARENT,
        R.attr.actionBarSize
    );
toolbar.setLayoutParams(toolBarParams);

代码示例来源:origin: stackoverflow.com

Toolbar myToolbar = new Toolbar(...);
myToolbar.setId(toolbar);
pane.getChildren().add(myToolbar);

代码示例来源:origin: stackoverflow.com

//with the right arguments passed at the constructor
Toolbar toolbar = new Toolbar();
FloatingActionButton fab = new FloatingActionButton();

代码示例来源:origin: stackoverflow.com

setTitle("Chess game");
 setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
 ImageIcon img = new ImageIcon("pieceImages/whiteKing.png");
 contentPane = getContentPane();
 contentPane.setLayout(new BorderLayout());
 Toolbar toolbar = new Toolbar();
 JPanel labelsPanel = new JPanel();
 GridLayout gridLayout = new GridLayout(8, 8);
 labelsPanel.setLayout(gridLayout);
 for (int i = 0; i < 8; i++) {
   for (int j = 0; j < 8; j++) {
     labels[i][j]=new JLabel(game.getBoard()[i][j].getImagePath());
     labelsPanel.add(labels[i][j]);
   }
 }
 contentPane.add(toolbar, BorderLayout.NORTH);
 contentPane.add(labelsPanel, BorderLayout.CENTER);
 setIconImage(img.getImage());
 setResizable(false);
 setSize(600, 600);
 setLocationRelativeTo(null);
 setVisible(true);

代码示例来源:origin: stackoverflow.com

private static void createAndShowGui() {

 Toolbar toolBar = new Toolbar();
 TextPanel textPanel = new TextPanel();

 toolBar.setTextPanel(textPanel);  // ****** passing in my reference *******

 JFrame frame = new JFrame("Add New Lines");
 frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
 frame.getContentPane().add(textPanel);
 frame.getContentPane().add(toolBar, BorderLayout.PAGE_START);
 frame.pack();
 frame.setLocationByPlatform(true);
 frame.setVisible(true);
}

代码示例来源:origin: stackoverflow.com

private void initComponents() {
  JFrame mainframe = new JFrame("Main Frame");
  Editor editor = new Editor();
  Toolbar toolbar = new Toolbar();
  toolbar.addListener(editor); // register listener
  ...
}

代码示例来源:origin: stackoverflow.com

ChatPanel chatPane = new ChatPanel();

HelloAction action = new HelloAction(chatPane);
Toolbar toolBar = new Toolbar();
toolBar.addAction(action);
//... Add what ever other actions you might like...

代码示例来源:origin: stackoverflow.com

homeToolBar = new Toolbar(false);
int ScreenWidth = Display.getInstance().getDisplayWidth();
centerCnt.setWidth(ScreenWidth - 2 * ExitCommand.getIcon().getWidth());
centerCnt.setLayout(new BorderLayout());
centerCnt.addComponent(BorderLayout.CENTER,btnLogo);
currentForm.setToolBar(homeToolBar);
currentForm.addCommand(SideLogoCommand);
homeToolBar.addCommandToSideMenu(MenuCommand);
homeToolBar.setTitleComponent(centerCnt);
homeToolBar.addCommandToRightBar(ExitCommand);
Command BackCMD = new Command("Back") {
  @Override
  public void actionPerformed(ActionEvent evt) {
    System.out.println("Back"); 
  }
};
BackCMD.putClientProperty("uiid", "BackCommand");
currentForm.setBackCommand(BackCMD);
homeToolBar.addCommandToLeftBar(BackCMD);

代码示例来源:origin: stackoverflow.com

import android.support.design.widget.AppBarLayout;
import android.support.v4.app.NavUtils;
import android.support.v7.widget.Toolbar;

private void setupActionBar() {
  Toolbar toolbar = new Toolbar(this);

  AppBarLayout appBarLayout = new AppBarLayout(this);
  appBarLayout.addView(toolbar);

  final ViewGroup root = (ViewGroup) findViewById(android.R.id.content);
  final ViewGroup window = (ViewGroup) root.getChildAt(0);
  window.addView(appBarLayout, 0);

  setSupportActionBar(toolbar);

  // Show the Up button in the action bar.
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  toolbar.setNavigationOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      onBackPressed();
    }
  });
}

代码示例来源:origin: stackoverflow.com

Toolbar t = new Toolbar();
myForm.setToolbar(t);
t.setTitle("My title");
Command back = new Command("back") {

  @Override
  public void actionPerformed(ActionEvent evt) {
    myForm.showBack();
  }
};
myForm.setBackCommand(back);
t.addCommandToLeftBar(back);

代码示例来源:origin: stackoverflow.com

private Command myCommand = new Command("");
Form f = new Form("Test form");
Toolbar t = new Toolbar();
f.setToolbar(t);

Command back = new Command("Back") {

  @Override
  public void actionPerformed(ActionEvent evt) {
    //Do stuff
  }
};
back.putClientProperty("uiid", "BackCommand");
f.setBackCommand(back);
t.addCommandToLeftBar(back);

myCommand = new Command(YourProgressImage) {

  @Override
  public void actionPerformed(ActionEvent evt) {
    //To show the progress when some actions are being performed 
    showTitleProgress(t);
    //When you're done, discard the progress and restore your command
    hideTitleProgress(t, myCommand);
  }
}
myCommand.putClientProperty("TitleCommand", true);
t.addCommandToRightBar(myCommand);
f.show();

代码示例来源:origin: stackoverflow.com

final Form caf = new Form("configure alerts");
     Toolbar bar = new Toolbar();                
     caf.setToolBar(bar);
     caf.addCommandToSideMenu(...);

代码示例来源:origin: stackoverflow.com

Toolbar t = new Toolbar();
f.setToolBar(t);
Command news = new Command("News", myIcon) {

  @Override
  public void actionPerformed(ActionEvent evt) {

  }
};
news.putClientProperty("uiid", "BackCommand");
f.setBackCommand(news);
t.addCommandToLeftBar(news);
t.setTitle("My Form");

代码示例来源:origin: stackoverflow.com

f.add(c);
tool = new Toolbar();
Graphics g  = tool.getGraphics();
tool.installStartupTools();

代码示例来源:origin: stackoverflow.com

final Form hi = new Form("First");
 Button test = new Button("Test");
 test.addActionListener((e) -> {
   Form newForm = new Form("Bye");
   newForm.setToolbar(new Toolbar());
   newForm.setBackCommand(new Command("Back") {
     @Override
     public void actionPerformed(ActionEvent evt) {
       hi.showBack();
     }
   });
   newForm.show();
 });
 hi.show();

代码示例来源:origin: stackoverflow.com

final Toolbar bar = new Toolbar();
final Form rd = new Form("resource details");
final Resource thisResource = this;

代码示例来源:origin: net.imagej/ij

toolbar = new Toolbar();
toolbar.addKeyListener(this);
add("Center", toolbar);

相关文章