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

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

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

JSplitPane.setRightComponent介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

private void initUI() {
  mainPanel = new JPanel(new BorderLayout());
  JSplitPane splitPane = new JSplitPane();
  splitPane.setResizeWeight(SPLIT_PANE_RESIZE_WEIGHT);
  mainPanel.add(splitPane);
  leftPane.add(new JScrollPane(tree), BorderLayout.CENTER);
  leftPane.add(progressPane, BorderLayout.PAGE_END);
  splitPane.setLeftComponent(leftPane);
  splitPane.setRightComponent(tabbedPane);

代码示例来源:origin: 4thline/cling

@PostConstruct
public void init() {
  browserPanel.add(browserView.asUIComponent(), BorderLayout.CENTER);
  browserPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 5));
  browserPanel.setPreferredSize(new Dimension(250, 250));
  browserPanel.setMinimumSize(new Dimension(250, 250));
  infoPanel.add(deviceInfosView.asUIComponent(), BorderLayout.CENTER);
  infoPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
  infoPanel.setPreferredSize(new Dimension(675, 200));
  infoPanel.setMinimumSize(new Dimension(650, 200));
  eastWestSplitPane.setBorder(BorderFactory.createEmptyBorder());
  eastWestSplitPane.setResizeWeight(0);
  eastWestSplitPane.setLeftComponent(browserPanel);
  eastWestSplitPane.setRightComponent(infoPanel);
  northSouthSplitPane.setBorder(BorderFactory.createEmptyBorder());
  northSouthSplitPane.setResizeWeight(0.8);
  northSouthSplitPane.setTopComponent(eastWestSplitPane);
  northSouthSplitPane.setBottomComponent(logView.asUIComponent());
  add(toolbarView.asUIComponent(), BorderLayout.NORTH);
  add(northSouthSplitPane, BorderLayout.CENTER);
  setSize(new Dimension(975, 700));
  setMinimumSize(new Dimension(975, 450));
  setResizable(true);
}

代码示例来源:origin: magefree/mage

jSplitPane1 = new javax.swing.JSplitPane();
jScrollPanePlayers = new javax.swing.JScrollPane();
jTablePlayers = new MageTable(tableInfo);
jSplitPane1.setRightComponent(jTabbedPaneText);

代码示例来源:origin: SonarSource/sonarqube

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
splitPane = new JSplitPane();
frame.getContentPane().add(splitPane, BorderLayout.CENTER);
splitPane.setRightComponent(tabbedPane);
splitPane.setLeftComponent(treeScrollPane);

代码示例来源:origin: Nepxion/Thunder

private void showTable(boolean visible) {
  container.removeAll();
  if (visible) {
    splitPane.setDividerLocation(380);
    splitPane.setLeftComponent(this);
    splitPane.setRightComponent(tableScrollPane);
    container.add(splitPane, BorderLayout.CENTER);
  } else {
    container.add(this, BorderLayout.CENTER);
  }
  ContainerManager.update(container);
}

代码示例来源:origin: xyz.cofe/gui.swing

public JSplitPane getSplitPane() {
  if( splitPane==null ){
    splitPane = new JSplitPane();
    splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    splitPane.setResizeWeight(1);
    splitPane.setDividerLocation(0.75);
    //splitPane.setDividerLocation(200);
  }
  splitPane.setRightComponent(getDescriptionPanel());
  return splitPane;
}

代码示例来源:origin: stanfordnlp/CoreNLP

splitPane = new javax.swing.JSplitPane();
topPanel = new javax.swing.JPanel();
buttonsAndFilePanel = new javax.swing.JPanel();
splitPane.setLeftComponent(topPanel);
splitPane.setRightComponent(treeContainer);

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

private static void swap(JSplitPane split) {
  Component r = split.getRightComponent();
  Component l = split.getLeftComponent();

  // remove the components
  split.setLeftComponent(null);
  split.setRightComponent(null);

  // add them swapped
  split.setLeftComponent(r);
  split.setRightComponent(l);
}

代码示例来源: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: log4j/log4j

JSplitPane tableViewerSplitPane = new JSplitPane();
tableViewerSplitPane.setOneTouchExpandable(true);
tableViewerSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
tableViewerSplitPane.setLeftComponent(_logTableScrollPane);
tableViewerSplitPane.setRightComponent(detailTAScrollPane);
JSplitPane splitPane = new JSplitPane();
splitPane.setOneTouchExpandable(true);
splitPane.setRightComponent(tableViewerSplitPane);
splitPane.setLeftComponent(categoryExplorerTreeScrollPane);

代码示例来源:origin: rholder/gradle-view

public void run() {
    if(gradleBaseDir != null) {
      setTitle(TITLE + " - " + gradleBaseDir);
    }
    splitter.setLeftComponent(new JScrollPane(fullTree));
    splitter.setRightComponent(new JScrollPane(information));
    splitter.setDividerLocation(0.75);
  }
});

代码示例来源: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: 4thline/cling

@PostConstruct
public void init() {
  addWindowListener(
      new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent windowEvent) {
          dispose();
        }
      }
  );
  JScrollPane containerTreePane;
  containerTreePane = new JScrollPane(treeView.asUIComponent());
  containerTreePane.setMinimumSize(new Dimension(180, 200));
  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  splitPane.setBorder(new EmptyBorder(10, 10, 10, 10));
  splitPane.setLeftComponent(containerTreePane);
  splitPane.setRightComponent(detailView.asUIComponent());
  splitPane.setResizeWeight(0.65);
  setLayout(new BorderLayout());
  setPreferredSize(new Dimension(700, 500));
  setMinimumSize(new Dimension(500, 250));
  add(splitPane, BorderLayout.CENTER);
  pack();
  setVisible(true);
}

代码示例来源:origin: antlr/antlrworks

public void setComponents(Component leftComponent, Component middleComponent, Component rightComponent) {
  leftSplitPane.setLeftComponent(left = leftComponent);
  leftSplitPane.setRightComponent(middle = middleComponent);
  rightSplitPane.setLeftComponent(leftSplitPane);
  rightSplitPane.setRightComponent(right = rightComponent);
  add(rightSplitPane, BorderLayout.CENTER);
  resize();
}

代码示例来源:origin: knowm/XChart

public XChartStyleDemo() {
 styleSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
 styleSplitPane.setLeftComponent(this);
 stylePanel = new ChartStylePanel(chartPanel);
 styleSplitPane.setRightComponent(stylePanel);
}

代码示例来源:origin: jdmp/java-data-mining-package

public SamplePanel(SampleGUIObject s) {
  super(s);
  rightPanel.setLayout(new GridLayout(1, 1));
  rightPanel.add(new VariableListPanel(s.getCoreObject()));
  splitPane.setLeftComponent(leftPanel);
  splitPane.setRightComponent(rightPanel);
  add(splitPane, BorderLayout.CENTER);
}

代码示例来源:origin: pentaho/mondrian

/**
 * This method is called from within the constructor to
 * initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is
 * always regenerated by the Form Editor.
 */
private void initComponents() {//GEN-BEGIN:initComponents
  jSplitPane1 = new javax.swing.JSplitPane();
  jScrollPane1 = new javax.swing.JScrollPane();
  tree = new javax.swing.JTree();
  jScrollPane2 = new javax.swing.JScrollPane();
  setLayout(new java.awt.BorderLayout());
  jSplitPane1.setDividerLocation(200);
  jScrollPane1.setViewportView(tree);
  jSplitPane1.setLeftComponent(jScrollPane1);
  jSplitPane1.setRightComponent(jScrollPane2);
  add(jSplitPane1, java.awt.BorderLayout.CENTER);
} //GEN-END:initComponents

代码示例来源:origin: protegeproject/protege

public ViewContainer(ViewContainer left, ViewContainer right, int orientation) {
  setLayout(new BorderLayout());
  JSplitPane sp = createSplitPane(orientation);
  add(sp);
  sp.setLeftComponent(left);
  sp.setRightComponent(right);
}

代码示例来源:origin: magefree/mage

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
  deckAreaSplitPane = new javax.swing.JSplitPane();
  deckList = new mage.client.cards.DragCardGrid();
  sideboardList = new mage.client.cards.DragCardGrid();
  deckAreaSplitPane.setBorder(null);
  deckAreaSplitPane.setResizeWeight(0.6);
  deckAreaSplitPane.setLeftComponent(deckList);
  deckAreaSplitPane.setRightComponent(sideboardList);
  javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
  this.setLayout(layout);
  layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(deckAreaSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 918, Short.MAX_VALUE)
  );
  layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addComponent(deckAreaSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 377, Short.MAX_VALUE)
  );
}// </editor-fold>//GEN-END:initComponents

代码示例来源:origin: BranislavLazic/SwingTutorials

public JListTutorial() {
  list.setModel(model);
  model.addElement(new Product("Oranges", new BigDecimal("2.00"), "These are fresh oranges"));
  model.addElement(new Product("Apples", new BigDecimal("1.50"), "These are fresh apples"));
  list.getSelectionModel().addListSelectionListener(e -> {
    Product p = list.getSelectedValue();
    label.setText("Name: " + p.getName() + " ::: " + p.getPrice().toPlainString() + " ::: " + p.getDesc());
  });
  splitPane.setLeftComponent(new JScrollPane(list));
  panel.add(label);
  splitPane.setRightComponent(panel);
  frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  frame.add(splitPane);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

相关文章

JSplitPane类方法