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


Java MetalScrollBarUI类代码示例

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


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

示例1: initializeTreeScrollSupport

import javax.swing.plaf.metal.MetalScrollBarUI; //导入依赖的package包/类
/** Initialize full support for horizontal scrolling.
 */
private void initializeTreeScrollSupport() {
    scrollPane = new JScrollPane();
    scrollPane.setName("TreeTableView.scrollpane"); //NOI18N
    scrollPane.setBorder(BorderFactory.createEmptyBorder());
    scrollPane.setViewportBorder(BorderFactory.createEmptyBorder());

    if (UIManager.getColor("Table.background") != null) { // NOI18N
        scrollPane.getViewport().setBackground(UIManager.getColor("Table.background")); // NOI18N
    }

    hScrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
    hScrollBar.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);
    hScrollBar.setVisible(false);

    listener = new ScrollListener();

    treeTable.addPropertyChangeListener(listener);
    scrollPane.getViewport().addComponentListener(listener);
    tree.addPropertyChangeListener(listener);
    hScrollBar.getModel().addChangeListener(listener);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:TreeTableView.java

示例2: createScrollBarSwapListener

import javax.swing.plaf.metal.MetalScrollBarUI; //导入依赖的package包/类
protected PropertyChangeListener createScrollBarSwapListener() {
  return new PropertyChangeListener() {
    public void propertyChange(PropertyChangeEvent e) {
      String propertyName = e.getPropertyName();
      if (propertyName.equals(VERTICAL_SCROLL_BAR_PROPERTY) ||
          propertyName.equals(HORIZONTAL_SCROLL_BAR_PROPERTY)) {
        ((JScrollBar) e.getOldValue()).putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP,
            null);
        ((JScrollBar) e.getNewValue()).putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP,
            Boolean.FALSE);
      }
      else if (BORDER_PROPERTY.equals(propertyName)) {
        updateScrollbarsFreeStanding();
      }
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:BegScrollPaneUI.java

示例3: initializeTreeScrollSupport

import javax.swing.plaf.metal.MetalScrollBarUI; //导入依赖的package包/类
/** Initialize full support for horizontal scrolling.
    */
   private void initializeTreeScrollSupport() {
       scrollPane = new JScrollPane() {
           public void setBorder(Border b) {
               super.setBorder(null);
           }
       };
       scrollPane.getViewport().setBackground(UIManager.getColor("Table.background")); // NOI18N

       hScrollBar = new JScrollBar(JScrollBar.HORIZONTAL);
hScrollBar.putClientProperty(MetalScrollBarUI.FREE_STANDING_PROP, Boolean.FALSE);

       listener = new ScrollListener();
       
       treeTable.addPropertyChangeListener(listener);
       scrollPane.getViewport().addComponentListener(listener);
       tree.addPropertyChangeListener(listener);
       hScrollBar.getModel().addChangeListener(listener);
   }
 
开发者ID:CharlesSkelton,项目名称:studio,代码行数:21,代码来源:TreeTableView.java

示例4: updateScrollbarsFreeStanding

import javax.swing.plaf.metal.MetalScrollBarUI; //导入依赖的package包/类
/**
 * If the border of the scrollpane is an instance of
 * <code>MetalBorders.ScrollPaneBorder</code>, the client property
 * <code>FREE_STANDING_PROP</code> of the scrollbars
 * is set to false, otherwise it is set to true.
 */
private void updateScrollbarsFreeStanding() {
  if (scrollpane == null) {
    return;
  }
  Object value = Boolean.FALSE;
  scrollpane.getHorizontalScrollBar().putClientProperty
      (MetalScrollBarUI.FREE_STANDING_PROP, value);
  scrollpane.getVerticalScrollBar().putClientProperty
      (MetalScrollBarUI.FREE_STANDING_PROP, value);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:BegScrollPaneUI.java

示例5: configureScroller

import javax.swing.plaf.metal.MetalScrollBarUI; //导入依赖的package包/类
/**
 * Configures the JScrollPane created by #createScroller().
 */
@Override
protected void configureScroller() {
    super.configureScroller();
    scroller.getVerticalScrollBar().putClientProperty(
        MetalScrollBarUI.FREE_STANDING_PROP,
        Boolean.FALSE);
}
 
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:11,代码来源:PlasticComboBoxUI.java


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