本文整理了Java中javax.swing.JToolBar.setBorder()
方法的一些代码示例,展示了JToolBar.setBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToolBar.setBorder()
方法的具体详情如下:
包路径:javax.swing.JToolBar
类名称:JToolBar
方法名:setBorder
暂无
代码示例来源:origin: org.netbeans.api/org-openide-awt
/**
* Creates a new tool bar with a specified
* <code>name</code> and
* <code>orientation</code>. All other constructors call this constructor.
* If
* <code>orientation</code> is an invalid value, an exception will be
* thrown.
*
* @param name the name of the tool bar
* @param orientation the initial orientation -- it must be * either <code>HORIZONTAL</code> or <code>VERTICAL</code>
* @exception IllegalArgumentException if orientation is neither
* <code>HORIZONTAL</code> nor <code>VERTICAL</code>
*/
public ToolbarWithOverflow(String name, int orientation) {
super(name, orientation);
setupOverflowButton();
popup = new JPopupMenu();
popup.setBorderPainted(false);
popup.setBorder(BorderFactory.createEmptyBorder());
overflowToolbar = new JToolBar("overflowToolbar", orientation == HORIZONTAL ? VERTICAL : HORIZONTAL);
overflowToolbar.setFloatable(false);
overflowToolbar.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));
}
代码示例来源:origin: org.protege/protege-editor-owl
public OWLEntityNavPanel(OWLEditorKit owlEditorKit) {
this.editorKit = owlEditorKit;
createActions();
setLayout(new BorderLayout());
JToolBar toolBar = new JToolBar();
toolBar.add(backAction);
toolBar.add(forwardAction);
toolBar.setBorder(null);
toolBar.setFloatable(false);
toolBar.setBorderPainted(false);
add(toolBar);
mediator = new OWLEntityNavigationMediator(editorKit, backAction, forwardAction);
}
代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl
public OWLEntityNavPanel(OWLEditorKit owlEditorKit) {
this.editorKit = owlEditorKit;
createActions();
setLayout(new BorderLayout());
JToolBar toolBar = new JToolBar();
toolBar.add(backAction);
toolBar.add(forwardAction);
toolBar.setBorder(null);
toolBar.setFloatable(false);
toolBar.setBorderPainted(false);
add(toolBar);
mediator = new OWLEntityNavigationMediator(editorKit, backAction, forwardAction);
}
代码示例来源:origin: jshiell/checkstyle-idea
progressPanel.setFloatable(false);
progressPanel.setBackground(UIManager.getColor("Panel.background"));
progressPanel.setBorder(null);
代码示例来源:origin: edu.stanford.protege/org.protege.editor.core.application
public ViewBar(String bannerText, Color bannerColor) {
setLayout(new BorderLayout(2, 2));
viewBanner = new ViewBanner(bannerText, bannerColor);
add(viewBanner, BorderLayout.NORTH);
toolBar = new JToolBar();
add(toolBar, BorderLayout.SOUTH);
toolBar.setOpaque(false);
toolBar.setFloatable(false);
toolBar.setBorderPainted(false);
toolBar.setBorder(null);
}
代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler
@Override
public void setBorder(Border b) {
Object border = UIManager.get("MainToolBar.border");
if (border instanceof Border) {
super.setBorder((Border) border);
}
}
代码示例来源:origin: org.protege/protege-editor-core-application
public ViewBar(String bannerText, Color bannerColor) {
setLayout(new BorderLayout(2, 2));
viewBanner = new ViewBanner(bannerText, bannerColor);
add(viewBanner, BorderLayout.NORTH);
toolBar = new JToolBar();
add(toolBar, BorderLayout.SOUTH);
toolBar.setOpaque(false);
toolBar.setFloatable(false);
toolBar.setBorderPainted(false);
toolBar.setBorder(null);
}
代码示例来源:origin: org.apache.cayenne.modeler/cayenne-modeler
void setDocked(boolean isDocked) {
if(isDocked) {
dockItem.setIcon(UNDOCK_ICON);
dockItem.setText("Undock");
buttonsBar.setBorder(TopBorder.create());
} else {
dockItem.setIcon(DOCK_ICON);
dockItem.setText("Dock");
buttonsBar.setBorder(BorderFactory.createEmptyBorder());
}
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-inspect
private void initPanel() {
setBorder(new EmptyBorder(1, 2, 1, 2));
// configure toolbar
toolbar = new NoBorderToolBar(JToolBar.HORIZONTAL);
toolbar.setFloatable(false);
toolbar.setRollover(true);
toolbar.setBorderPainted(false);
toolbar.setBorder(BorderFactory.createEmptyBorder());
toolbar.setOpaque(false);
toolbar.setFocusable(false);
add(toolbar);
}
代码示例来源:origin: edu.stanford.protege/ca.uvic.cs.chisel.cajun
public JToolBar getToolBar() {
if (toolbar == null) {
toolbar = new JToolBar(JToolBar.HORIZONTAL);
toolbar.setFloatable(false);
toolbar.setBorder(BorderFactory.createRaisedBevelBorder());
}
return toolbar;
}
代码示例来源:origin: stackoverflow.com
JToolBar component = new JToolBar();
component.setRollover(true);
component.setBorder(null);
component.setFloatable(false);
button = new JButton("Three");
button.setFocusable(false);
component.add(button);
button = new JButton("Four");
button.setFocusable(false);
component.add(button);
toolbar.add(component);
代码示例来源:origin: org.jspresso.framework/jspresso-swing-application
/**
* Creates a tool bar.
*
* @return the created tool bar.
*/
protected JToolBar createJToolBar() {
JToolBar toolBar = new JToolBar();
toolBar.setRollover(true);
toolBar.setFloatable(true);
toolBar.setBorder(BorderFactory.createRaisedBevelBorder());
return toolBar;
}
代码示例来源:origin: org.gephi/desktop-statistics
private void initDesign() {
Border b = (Border) UIManager.get("Nb.Editor.Toolbar.border"); //NOI18N
toolbar.setBorder(b);
if (UIUtils.isAquaLookAndFeel()) {
toolbar.setBackground(UIManager.getColor("NbExplorerView.background"));
}
}
代码示例来源:origin: org.jspresso/jspresso-swing-application
/**
* Creates a tool bar.
*
* @return the created tool bar.
*/
protected JToolBar createJToolBar() {
JToolBar toolBar = new JToolBar();
toolBar.setRollover(true);
toolBar.setFloatable(true);
toolBar.setBorder(BorderFactory.createRaisedBevelBorder());
return toolBar;
}
代码示例来源:origin: org.zaproxy/zap
private JToolBar getToolbarRight() {
if (footerToolbarRight == null) {
footerToolbarRight = new JToolBar();
footerToolbarRight.setEnabled(true);
footerToolbarRight.setFloatable(false);
footerToolbarRight.setRollover(true);
footerToolbarRight.setName("Footer Toolbar Right");
footerToolbarRight.setBorder(BorderFactory.createEmptyBorder());
}
return footerToolbarRight;
}
代码示例来源:origin: org.zaproxy/zap
private JToolBar getToolbarLeft() {
if (footerToolbarLeft == null) {
footerToolbarLeft = new JToolBar();
footerToolbarLeft.setEnabled(true);
footerToolbarLeft.setFloatable(false);
footerToolbarLeft.setRollover(true);
footerToolbarLeft.setName("Footer Toolbar Left");
footerToolbarLeft.setBorder(BorderFactory.createEmptyBorder());
}
return footerToolbarLeft;
}
代码示例来源:origin: org.zaproxy/zap
private JToolBar getToolbar() {
if (toolbar == null) {
toolbar = new JToolBar();
toolbar.setEnabled(true);
toolbar.setFloatable(false);
toolbar.setRollover(true);
toolbar.setName("Main Toolbar");
toolbar.setBorder(BorderFactory.createEmptyBorder());
}
return toolbar;
}
代码示例来源:origin: org.nuiton/nuiton-widgets
/**
* Creates and returns a <code>JToolBar</code>
*/
public static JToolBar createToolBar() {
JToolBar toolBar = new JToolBar();
toolBar.setFloatable(false);
toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
toolBar.setFloatable(false);
Border marginBorder = new EmptyBorder(0, 2, 0, 2);
EtchedBorder etchedBorder = new EtchedBorder();
Border compoundBorder = new CompoundBorder(etchedBorder, marginBorder);
toolBar.setBorder(compoundBorder);
return toolBar;
}
代码示例来源:origin: datacleaner/DataCleaner
public static JToolBar createToolBar() {
final JToolBar toolBar = new JToolBar(JToolBar.HORIZONTAL);
toolBar.setOpaque(false);
toolBar.setBorder(null);
toolBar.setRollover(true);
toolBar.setFloatable(false);
toolBar.setAlignmentY(JToolBar.LEFT_ALIGNMENT);
return toolBar;
}
代码示例来源:origin: atarw/material-ui-swing
@Override
public void installUI (JComponent c) {
super.installUI (c);
JToolBar toolBar = (JToolBar) c;
toolBar.setFont (UIManager.getFont ("ToolBar.font"));
toolBar.setBackground (UIManager.getColor ("ToolBar.background"));
toolBar.setForeground (UIManager.getColor ("ToolBar.foreground"));
toolBar.setBorder (UIManager.getBorder ("ToolBar.border"));
this.dockingBorderColor = null;
this.floatingBorderColor = null;
this.dockingColor = UIManager.getColor ("ToolBar.dockingBackground");
this.floatingColor = UIManager.getColor ("ToolBar.floatingBackground");
}
内容来源于网络,如有侵权,请联系作者删除!