本文整理汇总了Java中javax.swing.JToolBar.addSeparator方法的典型用法代码示例。如果您正苦于以下问题:Java JToolBar.addSeparator方法的具体用法?Java JToolBar.addSeparator怎么用?Java JToolBar.addSeparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JToolBar
的用法示例。
在下文中一共展示了JToolBar.addSeparator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFilterToolBarUI
import javax.swing.JToolBar; //导入方法依赖的package包/类
private void createFilterToolBarUI(JToolBar toolbar, FiltersDescriptor filtersDesc) {
toolbar.removeAll();
// create toggle buttons
int filterCount = filtersDesc.getFilterCount();
ArrayList<JToggleButton> toggles = new ArrayList<JToggleButton>(filterCount);
JToggleButton toggleButton = null;
for (int i = 0; i < filterCount; i++) {
toggleButton = createToggle(filtersDesc, i);
toggles.add(toggleButton);
}
// add toggle buttons
for (int i = 0; i < toggles.size(); i++) {
JToggleButton curToggle = toggles.get(i);
curToggle.addActionListener(new ToggleButtonActionListener(i));
toolbar.add(curToggle);
if (i != toggles.size() - 1) {
toolbar.addSeparator(new Dimension(3, 0));
}
}
}
示例2: fillToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
private void fillToolBar(JToolBar result) {
result.removeAll();
result.add(getActions().getExplorationDialogAction());
result.addSeparator();
result.add(getActions().getStartSimulationAction());
result.add(getActions().getApplyMatchAction());
result.add(getActions().getAnimateAction());
result.add(getActions().getExploreAction());
result.addSeparator();
result.add(getActions().getBackAction());
result.add(getActions().getForwardAction());
result.addSeparator();
result.add(getJGraph().getModeButton(JGraphMode.SELECT_MODE));
result.add(getJGraph().getModeButton(JGraphMode.PAN_MODE));
result.addSeparator();
result.add(getFilterPanel());
result.add(getBoundSpinnerPanel());
result.add(Box.createGlue());
}
示例3: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
@Override
protected JToolBar createToolBar() {
JToolBar result = super.createToolBar();
result.addSeparator();
result.add(getJGraph().getModeButton(EDIT_MODE));
result.add(getJGraph().getModeButton(PREVIEW_MODE));
result.addSeparator();
result.add(getUndoAction());
result.add(getRedoAction());
result.addSeparator();
result.add(getCopyAction());
result.add(getPasteAction());
result.add(getCutAction());
result.add(getDeleteAction());
result.addSeparator();
result.add(getSnapToGridButton());
processToolBar(result);
return result;
}
示例4: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
public JToolBar createToolBar() {
JToolBar bar = new JToolBar();
for (Action action : getActions()) {
if (action != null) {
String command = (String) action
.getValue(Action.ACTION_COMMAND_KEY);
JButton button = bar.add(action);
button.setFocusable(false);
if (action.getValue(Action.SHORT_DESCRIPTION) == null) {
String text = null;
StringGetter getter = (StringGetter) action
.getValue(StringGetter.ACTION_STRING_GETTER);
if (getter != null)
text = getter.getString(command);
else
text = GlobalResourcesManager.getString(command);
if (text != null)
button.setToolTipText(text);
}
} else
bar.addSeparator();
}
return bar;
}
示例5: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
private JToolBar createToolBar(final Object[] os) {
final JToolBar res = new JToolBar();
for (final Object o : os) {
if (o == null)
res.addSeparator();
else
res.add((Action) o);
}
desableFocus(res);
return res;
}
示例6: createToolbarPresenter
import javax.swing.JToolBar; //导入方法依赖的package包/类
/** Create the default toolbar representation of an array of actions.
* Null items in the array will add a separator to the toolbar.
*
* @param actions actions to show in the generated toolbar
* @return a toolbar instance displaying them
*/
public static JToolBar createToolbarPresenter(SystemAction[] actions) {
JToolBar p = new JToolBar();
for (SystemAction action : actions) {
if (action == null) {
p.addSeparator();
} else if (action instanceof Presenter.Toolbar) {
p.add(((Presenter.Toolbar) action).getToolbarPresenter());
}
}
return p;
}
示例7: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
private Component createToolBar() {
JToolBar bar = new JToolBar();
bar.setFloatable(false);
for (Action action : getActions())
if (action == null)
bar.addSeparator();
else
bar.add(action).setFocusable(false);
return bar;
}
示例8: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
private Component createToolBar(Action[] actions) {
JToolBar bar = new JToolBar();
bar.setFloatable(false);
for (Action action : actions) {
if (action == null)
bar.addSeparator();
else
bar.add(action).setFocusable(false);
}
return bar;
}
示例9: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
/**
* Creates a tool bar for the display.
*/
@Override
protected JToolBar createToolBar() {
JToolBar result = super.createToolBar();
result.addSeparator();
result.add(getUndoButton());
result.add(this.textArea.getRedoAction());
result.addSeparator();
result.add(this.textArea.getCopyAction());
result.add(this.textArea.getPasteAction());
result.add(this.textArea.getCutAction());
result.add(this.textArea.getDeleteAction());
return result;
}
示例10: createListToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
/** Creates a tool bar for the rule tree. */
@Override
protected JToolBar createListToolBar() {
int separation = 7;
JToolBar result = super.createListToolBar(separation);
result.add(getActions().getShiftPriorityAction(true));
result.add(getActions().getShiftPriorityAction(false));
result.addSeparator(new Dimension(separation, 0));
result.add(getCollapseAllButton());
return result;
}
示例11: createToolbar
import javax.swing.JToolBar; //导入方法依赖的package包/类
/**
* Creates new toolbar for current frame.
*/
private void createToolbar() {
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(true);
toolBar.add(newDocumentAction);
toolBar.add(openDocumentAction);
toolBar.add(saveDocumentAction);
toolBar.add(saveAsDocumentAction);
toolBar.add(closeCurrentTab);
toolBar.addSeparator();
toolBar.add(copyAction);
toolBar.add(cutAction);
toolBar.add(pasteAction);
toolBar.addSeparator();
toolBar.add(sortLinesAsc);
toolBar.add(sortLinesDesc);
toolBar.add(uniqueLinesAction);
toolBar.add(upperCaseAction);
toolBar.add(lowerCaseAction);
toolBar.add(reverseCaseAction);
toolBar.addSeparator();
toolBar.add(statisticsAction);
this.getContentPane().add(toolBar, BorderLayout.PAGE_START);
}
示例12: fillToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
private void fillToolBar(JToolBar result) {
result.removeAll();
result.add(getActions().getExplorationDialogAction());
result.addSeparator();
result.add(getActions().getStartSimulationAction());
result.add(getActions().getApplyMatchAction());
result.add(getActions().getAnimateAction());
result.add(getActions().getExploreAction());
result.addSeparator();
result.add(getActions().getBackAction());
result.add(getActions().getForwardAction());
}
示例13: createListToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
/**
* Creates a tool bar for the list panel.
* @param separation width of the separator on the tool bar;
* if negative, the default separator is used
*/
protected JToolBar createListToolBar(int separation) {
JToolBar result = Options.createToolBar();
result.add(getNewAction());
result.add(getEditAction());
if (separation >= 0) {
result.addSeparator(new Dimension(separation, 0));
} else {
result.addSeparator();
}
result.add(getCopyAction());
result.add(getDeleteAction());
result.add(getRenameAction());
if (separation >= 0) {
result.addSeparator(new Dimension(separation, 0));
} else {
result.addSeparator();
}
ResourceKind kind = getResourceKind();
if (kind.isEnableable()) {
result.add(getEnableButton());
if (getResourceKind() == ResourceKind.HOST || getResourceKind() == ResourceKind.TYPE
|| getResourceKind() == ResourceKind.PROLOG
|| getResourceKind() == ResourceKind.CONTROL) {
result.add(getEnableUniqueAction());
}
}
if (kind == ResourceKind.GROOVY) {
result.add(getActions().getExecGroovyAction());
}
return result;
}
示例14: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
/** Creates a tool bar for the label tree. */
public JToolBar createToolBar() {
JToolBar result = Options.createToolBar();
result.add(getShowSubtypesButton());
result.add(getShowSupertypesButton());
result.addSeparator();
result.add(getShowAllLabelsButton());
result.add(getCollapseAllButton());
// put the sub- and supertype buttons in a button group
ButtonGroup modeButtonGroup = new ButtonGroup();
modeButtonGroup.add(getShowSubtypesButton());
modeButtonGroup.add(getShowSupertypesButton());
return result;
}
示例15: createToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
private Component createToolBar() {
JToolBar bar = new JToolBar();
bar.add(undo);
bar.add(redo);
bar.addSeparator();
bar.add(addRow);
bar.add(removeRows);
bar.addSeparator();
bar.add(openNewWindow);
bar.addSeparator();
bar.add(saveAs);
return bar;
}