javax.swing.JSplitPane.setUI()方法的使用及代码示例

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

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

JSplitPane.setUI介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

private void initializeComponents () {
  splitPane = new JSplitPane();
  splitPane.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
    rightSplit.setUI(new BasicSplitPaneUI() {
      public void paint (Graphics g, JComponent jc) {
      rightSplitPane.setUI(new BasicSplitPaneUI() {
        public void paint (Graphics g, JComponent jc) {
    leftSplit.setUI(new BasicSplitPaneUI() {
      public void paint (Graphics g, JComponent jc) {

代码示例来源:origin: libgdx/libgdx

splitPane.setUI(new BasicSplitPaneUI() {
  public void paint (Graphics g, JComponent jc) {
  rightSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
  leftSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {

代码示例来源:origin: libgdx/libgdx

splitPane.setUI(new BasicSplitPaneUI() {
  public void paint (Graphics g, JComponent jc) {
  rightSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
  leftSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {

代码示例来源:origin: libgdx/libgdx

private void initializeComponents () {
  splitPane = new JSplitPane();
  splitPane.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
    rightSplit.setUI(new BasicSplitPaneUI() {
      public void paint (Graphics g, JComponent jc) {
      rightSplitPane.setUI(new BasicSplitPaneUI() {
        public void paint (Graphics g, JComponent jc) {
    leftSplit.setUI(new BasicSplitPaneUI() {
      public void paint (Graphics g, JComponent jc) {

代码示例来源:origin: com.fifesoft.rtext/fife.common

@Override
  public void setUI(SplitPaneUI ui) {
    super.setUI(new CleanSplitPaneUI());
  }
};

代码示例来源:origin: com.google.code.findbugs/findbugs

private void removeSplitPaneBorders(JSplitPane pane) {
  pane.setUI(new BasicSplitPaneUI() {
    @Override
    public BasicSplitPaneDivider createDefaultDivider() {
      return new BasicSplitPaneDivider(this) {
        @Override
        public void setBorder(Border b) {
        }
      };
    }
  });
  pane.setBorder(new EmptyBorder(3, 3, 3, 3));
}

代码示例来源:origin: SKCraft/Launcher

public static void flattenJSplitPane(JSplitPane splitPane) {
  splitPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
  BasicSplitPaneUI flatDividerSplitPaneUI = new BasicSplitPaneUI() {
    @Override
    public BasicSplitPaneDivider createDefaultDivider() {
      return new BasicSplitPaneDivider(this) {
        @Override
        public void setBorder(Border b) {
        }
      };
    }
  };
  splitPane.setUI(flatDividerSplitPaneUI);
  splitPane.setBorder(null);
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

private JSplitPane createSplitPane (Component lower) {
  JSplitPane pane = new JSplitPane();
  if (firstSplit == null) {
    firstSplit = Boolean.TRUE;
  } else {
    firstSplit = Boolean.FALSE;
  }
  pane.setRightComponent(lower);
  pane.setOrientation (JSplitPane.VERTICAL_SPLIT);
  pane.setContinuousLayout(true);
  pane.setResizeWeight(1);
  pane.setDividerLocation(0.80f);
  pane.setBorder (BorderFactory.createEmptyBorder());
  pane.setUI (PropUtils.createSplitPaneUI());
  return pane;
}

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

private JSplitPane createSplitPane (Component lower) {
  JSplitPane pane = new JSplitPane();
  if (firstSplit == null) {
    firstSplit = Boolean.TRUE;
  } else {
    firstSplit = Boolean.FALSE;
  }
  pane.setRightComponent(lower);
  pane.setOrientation (JSplitPane.VERTICAL_SPLIT);
  pane.setContinuousLayout(true);
  pane.setResizeWeight(1);
  pane.setDividerLocation(0.80f);
  pane.setBorder (BorderFactory.createEmptyBorder());
  pane.setUI (PropUtils.createSplitPaneUI());
  return pane;
}

代码示例来源:origin: com.numdata/numdata-swing

/**
 * Make {@link JSplitPane} controls invisible. This should help keeping the
 * user interface clean.
 *
 * @param splitPane   Split pane whose controls to make invisible.
 * @param borderSize  Size of empty border around split pane (e.g. 4).
 * @param dividerSize Size of split pane divider(e.g. 8).
 */
public static void makeSplitPaneControlsInvisible( final JSplitPane splitPane, final int borderSize, final int dividerSize )
{
  splitPane.setBorder( BorderFactory.createEmptyBorder( borderSize, borderSize, borderSize, borderSize ) );
  splitPane.setDividerSize( dividerSize );
  splitPane.setUI( new InvisibleSplitPaneUI() );
}

代码示例来源:origin: com.github.tornaia/aott-desktop-client-core

private JComponent createMainPanel() {
    JPanel categoryChartDonutAndProcessChart = new JPanel(new GridBagLayout());
    categoryChartDonutAndProcessChart.setBackground(ColorConst.CONTENT_BACKGROUND);
    categoryChartDonutAndProcessChart.setMinimumSize(new Dimension(0, 0));

    categoryChartDonutAndProcessChart.add(categoryChartPanelService.createCategoryChartPanel(), new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    categoryChartDonutAndProcessChart.add(categoryDonutPanelService.createCategoryDonutPanel(), new GridBagConstraints(1, 0, 1, 2, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    categoryChartDonutAndProcessChart.add(processChartPanelService.createProcessChartPanel(), new GridBagConstraints(0, 1, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));

    JPanel processTreePanel = processTreePanelService.createProcessTreePanel();
    processTreePanel.setMinimumSize(new Dimension(0, 0));

    JSplitPane mainSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, categoryChartDonutAndProcessChart, processTreePanel);
    PgsSplitPaneUI pgsSplitPaneUI = new PgsSplitPaneUI();
    mainSplitPane.setUI(pgsSplitPaneUI);
    pgsSplitPaneUI.getDivider().setBorder(BorderFactory.createEmptyBorder());
    pgsSplitPaneUI.getDivider().setBackground(ColorConst.CONTENT_BACKGROUND);
    mainSplitPane.setContinuousLayout(true);
    mainSplitPane.setBorder(BorderFactory.createEmptyBorder());
    mainSplitPane.setOneTouchExpandable(false);
    mainSplitPane.setResizeWeight(0.5D);

    mainSplitPane.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, new SnagToEdgesJSplitPanePropertyChangeListener(mainSplitPane));

    return mainSplitPane;
  }
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

private JSplitPane createSplitPane(Component lower) {
  JSplitPane pane = new JSplitPane();
  if (firstSplit == null) {
    firstSplit = Boolean.TRUE;
  } else {
    firstSplit = Boolean.FALSE;
  }
  pane.setRightComponent(lower);
  pane.setOrientation(JSplitPane.VERTICAL_SPLIT);
  pane.setContinuousLayout(true);
  pane.setResizeWeight(1);
  pane.setDividerLocation(0.80f);
  pane.setBorder(BorderFactory.createEmptyBorder());
  //Do not install our custom split pane UI on Nimbus L&F
  if (!"Nimbus".equals(UIManager.getLookAndFeel().getID())) {
    pane.setUI(PropUtils.createSplitPaneUI());
  }
  // #52188: default F6 behaviour doesn't make to much sense in NB 
  // property sheet and blocks NetBeans default F6
  pane.getActionMap().getParent().remove("toggleFocus");
  if( PropUtils.isAqua ) {
    pane.setBackground( UIManager.getColor("NbExplorerView.background") ); //NOI18N
  }
  return pane;
}

代码示例来源:origin: com.badlogicgames.gdx/gdx-tools

splitPane.setUI(new BasicSplitPaneUI() {
  public void paint (Graphics g, JComponent jc) {
  rightSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
  leftSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {

代码示例来源:origin: com.badlogicgames.gdx/gdx-tools

private void initializeComponents () {
  splitPane = new JSplitPane();
  splitPane.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
    rightSplit.setUI(new BasicSplitPaneUI() {
      public void paint (Graphics g, JComponent jc) {
      rightSplitPane.setUI(new BasicSplitPaneUI() {
        public void paint (Graphics g, JComponent jc) {
    leftSplit.setUI(new BasicSplitPaneUI() {
      public void paint (Graphics g, JComponent jc) {

代码示例来源:origin: stackoverflow.com

/**
 * Makes a split pane invisible. Only contained components are shown.
 *
 * @param splitPane
 */
public static void flattenJSplitPane(JSplitPane splitPane) {
  splitPane.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1));
  BasicSplitPaneUI flatDividerSplitPaneUI = new BasicSplitPaneUI() {
    @Override
    public BasicSplitPaneDivider createDefaultDivider() {
      return new BasicSplitPaneDivider(this) {
        @Override
        public void setBorder(Border b) {
        }
      };
    }
  };
  splitPane.setUI(flatDividerSplitPaneUI);
  splitPane.setBorder(null);
}

代码示例来源:origin: senbox-org/snap-desktop

splitPane.setRightComponent(endmemberPreviewPanel);
splitPane.setBorder(BorderFactory.createEmptyBorder());
splitPane.setUI(createPlainDividerSplitPaneUI());

代码示例来源:origin: bcdev/beam

splitPane.setRightComponent(endmemberPreviewPanel);
splitPane.setBorder(BorderFactory.createEmptyBorder());
splitPane.setUI(createPlainDividerSplitPaneUI());

代码示例来源:origin: com.google.code.findbugs/findbugs

splitP.setDividerLocation(GUISaveState.getInstance().getSplitSummary());
splitP.setOneTouchExpandable(true);
splitP.setUI(new BasicSplitPaneUI() {
  @Override
  public BasicSplitPaneDivider createDefaultDivider() {

代码示例来源:origin: com.fifesoft.rtext/fife.common

splitPane.setUI(new CleanSplitPaneUI());
splitPane.setContinuousLayout(true);
JScrollPane rightScrollPane = new RScrollPane(400,200, editorPane);

相关文章

JSplitPane类方法