当前位置: 首页>>代码示例>>Java>>正文


Java ButtonBarBuilder类代码示例

本文整理汇总了Java中com.jgoodies.forms.builder.ButtonBarBuilder的典型用法代码示例。如果您正苦于以下问题:Java ButtonBarBuilder类的具体用法?Java ButtonBarBuilder怎么用?Java ButtonBarBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ButtonBarBuilder类属于com.jgoodies.forms.builder包,在下文中一共展示了ButtonBarBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createButtonBar

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private JPanel createButtonBar()
	{
		_closeBtn.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent evt)
			{
				setVisible(false);
			}
		});

		final ButtonBarBuilder builder = new ButtonBarBuilder();
		builder.addGlue();
//		builder.addGridded(new JButton("Alter"));
//		builder.addRelatedGap();
		builder.addGridded(_closeBtn);

		return builder.getPanel();
	}
 
开发者ID:realxujiang,项目名称:bigtable-sql,代码行数:19,代码来源:AboutBoxDialog.java

示例2: layoutComponents

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void layoutComponents() {
    FormLayout layout = new FormLayout("d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.append("Port number", portTextField);
    builder.append(httpsPortCheckBox, httpsPortTextField);
    builder.append("Memory init (MB)", memoryInitTextField);
    builder.append("Memory limit (MB)", memoryTextField);
    builder.append("Context path", contextPathComboBox);

    setBorder(Borders.DIALOG_BORDER);

    setLayout(new BorderLayout(12, 12));
    add(builder.getPanel(), BorderLayout.CENTER);
    JPanel buttons = new ButtonBarBuilder()
        .addGlue()
        .addButton(defaultButton)
        .addRelatedGap()
        .addButton(saveButton)
        .addGlue()
        .build();
    add(buttons, BorderLayout.SOUTH);
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:23,代码来源:SettingsPanel.java

示例3: layoutComponents

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void layoutComponents() {
    JPanel buttons = new ButtonBarBuilder()
        .addGlue()
        .addButton(startButton)
        .addRelatedGap()
        .addButton(stopButton)
        .build();
    FormLayout layout = new FormLayout("right:d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.append("Service status", statusTextField);
    builder.append("", buttons);
    builder.appendParagraphGapRow();
    builder.nextRow();
    builder.append("Started on", startedTextField);
    builder.append("Memory used", memoryTextField);
    builder.append("Error message", errorTextField);
    builder.append("Server address", urlButton);

    setBorder(Borders.DIALOG_BORDER);
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:21,代码来源:StatusPanel.java

示例4: layoutComponents

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void layoutComponents() {
       FormLayout layout = new FormLayout("d, 6dlu, max(d;30dlu):grow");
       DefaultFormBuilder builder = new DefaultFormBuilder(layout);
       builder.append("Port number", portTextField);
       builder.append(httpsPortCheckBox, httpsPortTextField);
       builder.append("Memory init (MB)", memoryInitTextField);
       builder.append("Memory limit (MB)", memoryTextField);
       builder.append("Context path", contextPathComboBox);

       setBorder(Borders.DIALOG_BORDER);

       setLayout(new BorderLayout(12, 12));
       add(builder.getPanel(), BorderLayout.CENTER);
       JPanel buttons = new ButtonBarBuilder()
           .addGlue()
           .addButton(defaultButton)
           .addRelatedGap()
           .addButton(saveButton)
           .addGlue()
           .build();
       add(buttons, BorderLayout.SOUTH);
   }
 
开发者ID:MadMarty,项目名称:madsonic-server-5.1,代码行数:24,代码来源:SettingsPanel.java

示例5: layoutComponents

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void layoutComponents() {
       tabbedPane.add("Status", statusPanel);
       tabbedPane.add("Settings", settingsPanel);

       JPanel pane = (JPanel) getContentPane();
       pane.setLayout(new BorderLayout(10, 10));
       pane.add(tabbedPane, BorderLayout.CENTER);
       JPanel buttons = new ButtonBarBuilder()
           .addGlue()
           .addButton(closeButton)
           .build();
       pane.add(buttons, BorderLayout.SOUTH);

       pane.setBorder(Borders.TABBED_DIALOG_BORDER);
   }
 
开发者ID:MadMarty,项目名称:madsonic-server-5.1,代码行数:17,代码来源:MadsonicFrame.java

示例6: displayTerms

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void displayTerms(ProtectedTermsList list) {
    // Make a dialog box to display the contents:
    final JDialog dd = new JDialog(diag, list.getDescription() + " - " + list.getLocation(), true);

    JTextArea ta = new JTextArea(list.getTermListing());
    ta.setEditable(false);
    JScrollPane sp = new JScrollPane(ta);
    sp.setPreferredSize(new Dimension(700, 500));
    dd.getContentPane().add(sp, BorderLayout.CENTER);
    JButton okButton = new JButton(Localization.lang("OK"));
    ButtonBarBuilder bb = new ButtonBarBuilder();
    bb.addGlue();
    bb.addButton(okButton);
    bb.addGlue();
    bb.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    dd.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
    okButton.addActionListener(actionEvent -> dd.dispose());
    dd.pack();
    dd.setLocationRelativeTo(diag);
    dd.setVisible(true);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:22,代码来源:ProtectedTermsDialog.java

示例7: displayStyle

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void displayStyle(OOBibStyle style) {
    // Make a dialog box to display the contents:
    final JDialog dd = new JDialog(diag, style.getName(), true);

    JTextArea ta = new JTextArea(style.getLocalCopy());
    ta.setEditable(false);
    JScrollPane sp = new JScrollPane(ta);
    sp.setPreferredSize(new Dimension(700, 500));
    dd.getContentPane().add(sp, BorderLayout.CENTER);
    JButton okButton = new JButton(Localization.lang("OK"));
    ButtonBarBuilder bb = new ButtonBarBuilder();
    bb.addGlue();
    bb.addButton(okButton);
    bb.addGlue();
    bb.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    dd.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
    okButton.addActionListener(actionEvent -> dd.dispose());
    dd.pack();
    dd.setLocationRelativeTo(diag);
    dd.setVisible(true);
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:22,代码来源:StyleSelectDialog.java

示例8: buildWizardBar

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
public static JPanel buildWizardBar(JButton[] leftAlignedButtons, JButton back, JButton next, JButton overlaidFinish, JButton[] rightAlignedButtons)
{
  ButtonBarBuilder builder = new ButtonBarBuilder();
  if (leftAlignedButtons != null) {
    builder.addGriddedButtons(leftAlignedButtons);
    builder.addRelatedGap();
  }
  builder.addGlue();
  builder.addGridded(back);
  builder.addGridded(next);

  if (overlaidFinish != null) {
    builder.nextColumn(-1);
    builder.add(overlaidFinish);
    builder.nextColumn();
  }

  if (rightAlignedButtons != null) {
    builder.addRelatedGap();
    builder.addGriddedButtons(rightAlignedButtons);
  }
  return builder.getPanel();
}
 
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:24,代码来源:ButtonBarFactory.java

示例9: JTextAreaUndoWrapper

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
public JTextAreaUndoWrapper(JTextArea textArea){
    if (textArea == null){
        throw new NullPointerException("TextArea argument cannot be null");
    }
    this.textArea = textArea;
    textArea.setWrapStyleWord(true);
    textArea.setLineWrap(true);
    undoButton = new JButton(undoAction);
    redoButton = new JButton(redoAction);
    
    Document doc = textArea.getDocument();
    
    doc.addUndoableEditListener(
            new UndoableEditListener() {
                public void undoableEditHappened(UndoableEditEvent evt) {
                    undo.addEdit(evt.getEdit());
                }
            });

    textArea.getActionMap().put("Undo", undoAction);
    textArea.getInputMap().put(KeyStroke.getKeyStroke("control Z"), "Undo");

    textArea.getActionMap().put("Redo",redoAction);
    textArea.getInputMap().put(KeyStroke.getKeyStroke("control Y"), "Redo");

    setLayout(new BorderLayout());
    add(new JScrollPane(textArea), BorderLayout.CENTER);        
    ButtonBarBuilder bb= new ButtonBarBuilder();
    bb.addGridded(undoButton);
    bb.addRelatedGap();        
    bb.addGridded(redoButton);
    bb.addRelatedGap();        
    add(bb.getPanel(), BorderLayout.SOUTH);
    
}
 
开发者ID:SQLPower,项目名称:power-matchmaker,代码行数:36,代码来源:JTextAreaUndoWrapper.java

示例10: layoutComponents

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void layoutComponents() {
    tabbedPane.add("Status", statusPanel);
    tabbedPane.add("Settings", settingsPanel);

    JPanel pane = (JPanel) getContentPane();
    pane.setLayout(new BorderLayout(10, 10));
    pane.add(tabbedPane, BorderLayout.CENTER);
    JPanel buttons = new ButtonBarBuilder()
        .addGlue()
        .addButton(closeButton)
        .build();
    pane.add(buttons, BorderLayout.SOUTH);

    pane.setBorder(Borders.TABBED_DIALOG_BORDER);
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:16,代码来源:SubsonicFrame.java

示例11: layoutComponents

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void layoutComponents() {
    JPanel pane = (JPanel) getContentPane();
    pane.setLayout(new BorderLayout(10, 10));
    pane.add(statusPanel, BorderLayout.CENTER);
    JPanel buttons = new ButtonBarBuilder()
        .addGlue()
        .addButton(hideButton)
        .addRelatedGap()
        .addButton(exitButton)
        .build();
    pane.add(buttons, BorderLayout.SOUTH);

    pane.setBorder(Borders.DIALOG_BORDER);
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:15,代码来源:SubsonicFrame.java

示例12: init

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
/**
 * Sets up the dialog
 */
private void init() {
    mergeEntries = new MergeEntries(this.originalEntry, this.fetchedEntry, Localization.lang("Original entry"),
            Localization.lang("Entry from %0", type), panel.getBibDatabaseContext().getMode());

    // Create undo-compound
    ce = new NamedCompound(Localization.lang("Merge entry with %0 information", type));

    FormLayout layout = new FormLayout("fill:700px:grow", "fill:400px:grow, 4px, p, 5px, p");
    this.setLayout(layout);

    this.add(mergeEntries.getMergeEntryPanel(), cc.xy(1, 1));
    this.add(new JSeparator(), cc.xy(1, 3));

    // Create buttons
    ButtonBarBuilder bb = new ButtonBarBuilder();
    bb.addGlue();

    JButton cancel = new JButton(new CancelAction());
    JButton replaceEntry = new JButton(new ReplaceAction());

    bb.addButton(replaceEntry, cancel);
    this.add(bb.getPanel(), cc.xy(1, 5));

    // Add some margin around the layout
    layout.appendRow(RowSpec.decode(MARGIN));
    layout.appendColumn(ColumnSpec.decode(MARGIN));
    layout.insertRow(1, RowSpec.decode(MARGIN));
    layout.insertColumn(1, ColumnSpec.decode(MARGIN));

    WindowLocation pw = new WindowLocation(this, JabRefPreferences.MERGEENTRIES_POS_X,
            JabRefPreferences.MERGEENTRIES_POS_Y, JabRefPreferences.MERGEENTRIES_SIZE_X,
            JabRefPreferences.MERGEENTRIES_SIZE_Y);
    pw.displayWindowAtStoredLocation();

}
 
开发者ID:JabRef,项目名称:jabref,代码行数:39,代码来源:MergeFetchedEntryDialog.java

示例13: WaitForSaveOperation

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
public WaitForSaveOperation(JabRefFrame frame) {
    this.frame = frame;

    JButton cancel = new JButton(Localization.lang("Cancel"));
    JProgressBar prog = new JProgressBar(0);
    prog.setIndeterminate(true);
    prog.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    diag = new JDialog(frame, Localization.lang("Please wait..."), true);

    ButtonBarBuilder bb = new ButtonBarBuilder();
    bb.addGlue();
    bb.addButton(cancel);
    bb.addGlue();
    cancel.addActionListener(e -> {
        canceled = true;
        t.stop();
        diag.dispose();
    });

    JLabel message = new JLabel(Localization.lang("Waiting for save operation to finish") + "...");
    message.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));

    diag.getContentPane().add(message, BorderLayout.NORTH);
    diag.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
    diag.getContentPane().add(prog, BorderLayout.CENTER);
    diag.pack();
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:28,代码来源:WaitForSaveOperation.java

示例14: initButtonPanel

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private void initButtonPanel() {
    okButton.addActionListener(event -> {
        okPressed = true;
        dispose();
    });
    cancelButton.addActionListener(event -> dispose());

    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    buttons.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
    bb.addGlue();
    bb.addButton(okButton);
    bb.addButton(parseWithFreeCiteButton);
    bb.addButton(cancelButton);
    bb.addGlue();
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:16,代码来源:TextInputDialog.java

示例15: createCancelButtonBarPanel

import com.jgoodies.forms.builder.ButtonBarBuilder; //导入依赖的package包/类
private JPanel createCancelButtonBarPanel() {
    JButton cancel = new JButton(Localization.lang("Cancel"));
    cancel.addActionListener(this);

    // Make ESC close dialog, equivalent to clicking Cancel.
    cancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(Globals.getKeyPrefs().getKey(KeyBinding.CLOSE_DIALOG), "close");
    cancel.getActionMap().put("close", cancelAction);

    JPanel buttons = new JPanel();
    ButtonBarBuilder bb = new ButtonBarBuilder(buttons);
    bb.addGlue();
    bb.addButton(cancel);
    bb.addGlue();
    return buttons;
}
 
开发者ID:JabRef,项目名称:jabref,代码行数:16,代码来源:EntryTypeDialog.java


注:本文中的com.jgoodies.forms.builder.ButtonBarBuilder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。