javax.swing.JToolBar.getBorder()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(129)

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

JToolBar.getBorder介绍

暂无

代码示例

代码示例来源:origin: khuxtable/seaglass

if (toolbar.getBorder() instanceof UIResource) {
  return c.getHeight() - 1;
} else {

代码示例来源:origin: org.netbeans.modules/org-netbeans-lib-profiler-ui

public Dimension getPreferredSize() {
  Dimension dim = super.getPreferredSize();
  if (preferredHeight == -1) {
    JToolBar tb = new JToolBar();
    tb.setBorder(toolbar.getBorder());
    tb.setBorderPainted(toolbar.isBorderPainted());
    tb.setRollover(toolbar.isRollover());
    tb.setFloatable(toolbar.isFloatable());
    Icon icon = Icons.getIcon(GeneralIcons.SAVE);
    JButton b = new JButton("Button", icon); // NOI18N
    tb.add(b);
    JToggleButton t = new JToggleButton("Button", icon); // NOI18N
    tb.add(t);
    JComboBox c = new JComboBox();
    c.setEditor(new BasicComboBoxEditor());
    c.setRenderer(new BasicComboBoxRenderer());
    tb.add(c);
    tb.addSeparator();
    preferredHeight = tb.getPreferredSize().height;
  }
  dim.height = Math.max(dim.height, preferredHeight);
  return dim;
}
public void doLayout() {

代码示例来源:origin: khuxtable/seaglass

if (toolbar.getBorder() instanceof UIResource) {

相关文章

JToolBar类方法