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

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

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

JSplitPane.setBottomComponent介绍

暂无

代码示例

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

jsp.setBottomComponent(jp_south);

代码示例来源:origin: kiegroup/optaplanner

splitPane.setBottomComponent(bottomPanel);
splitPane.setResizeWeight(1.0);
setContentPane(splitPane);

代码示例来源:origin: igniterealtime/Smack

allPane.setBottomComponent(sublayout);

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

splitPane.setBottomComponent(outputArgumentsScrollPane);
splitPane.setResizeWeight(0.5);
mainPanel.add(splitPane, BorderLayout.CENTER);

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

/** Constructor */
public XChartDemo() {
 super(new GridLayout(1, 0));
 // Create the nodes.
 DefaultMutableTreeNode top = new DefaultMutableTreeNode("XChart Example Charts");
 createNodes(top);
 // Create a tree that allows one selection at a time.
 tree = new JTree(top);
 tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
 // Listen for when the selection changes.
 tree.addTreeSelectionListener(this);
 // Create the scroll pane and add the tree to it.
 JScrollPane treeView = new JScrollPane(tree);
 // Create Chart Panel
 chartPanel = new XChartPanel(new AreaChart01().getChart());
 // Add the scroll panes to a split pane.
 splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
 splitPane.setTopComponent(treeView);
 splitPane.setBottomComponent(chartPanel);
 Dimension minimumSize = new Dimension(130, 160);
 treeView.setMinimumSize(minimumSize);
 splitPane.setPreferredSize(new Dimension(700, 700));
 // Add the split pane to this panel.
 add(splitPane);
}

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

splitPane.setBottomComponent(bottomPanel);            // and at the bottom we want our "bottomPanel"

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

protected void init() {
 // Create the nodes.
 DefaultMutableTreeNode top = new DefaultMutableTreeNode("XChart Example Charts");
 createNodes(top);
 tree = new JTree(top);
 // Create a tree that allows one selection at a time.
 tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
 // Listen for when the selection changes.
 tree.addTreeSelectionListener(this);
 // Create the scroll pane and add the tree to it.
 JScrollPane treeView = new JScrollPane(tree);
 // Create Chart Panel
 tabbedPane = new JTabbedPane();
 for (int i = 0; i < tree.getRowCount(); i++) {
  tree.expandRow(i);
 }
 // select first leaf
 DefaultMutableTreeNode firstLeaf = top.getFirstLeaf();
 tree.setSelectionPath(new TreePath(firstLeaf.getPath()));
 // Add the scroll panes to a split pane.
 splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
 splitPane.setTopComponent(treeView);
 splitPane.setBottomComponent(tabbedPane);
 Dimension minimumSize = new Dimension(130, 160);
 treeView.setMinimumSize(minimumSize);
 splitPane.setPreferredSize(new Dimension(700, 700));
 // Add the split pane to this panel.
 add(splitPane);
}

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

parentSplit.setTopComponent(newPane);
} else {
  parentSplit.setBottomComponent(newPane);

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

public void close() {
  Container parent = getParent();
  if (!(parent instanceof JSplitPane)) return;
  JSplitPane split = (JSplitPane) parent;
  Component firstComponent = split.getTopComponent();
  Component secondComponent = split.getBottomComponent();
  Component remainingComponent = firstComponent == this ? secondComponent : firstComponent;
  split.setTopComponent(null);
  split.setBottomComponent(null);
  Container grandParent = parent.getParent();
  if (grandParent instanceof JSplitPane) {
    JSplitPane grandSplit = (JSplitPane) grandParent;
    // Remove the split pane.
    if (split == grandSplit.getTopComponent()) {
      grandSplit.setTopComponent(remainingComponent);
    } else {
      grandSplit.setBottomComponent(remainingComponent);
    }
  } else {
    grandParent.remove(parent);
    grandParent.add(remainingComponent);
  }
  grandParent.validate();
}

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

jSplitPane1.setResizeWeight(0.5);
jSplitPane1.setTopComponent(cardSelector);
jSplitPane1.setBottomComponent(deckArea);

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

jScrollPane2.setViewportView(tableMatches);
jSplitPane1.setBottomComponent(jScrollPane2);

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

splitPane.setBottomComponent(chartPanel);

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

private void split(int orientation) {
  Container parent = getParent();
  if (parent instanceof JSplitPane) {
    JSplitPane parentSplit = (JSplitPane) parent;
    boolean first = parentSplit.getTopComponent() == this;
    if (first) {
      parentSplit.setTopComponent(null);
    } else {
      parentSplit.setBottomComponent(null);
    }
    CustomSplitPane split = new CustomSplitPane(orientation, this, this.duplicate());
    if (first) {
      parentSplit.setTopComponent(split);
    } else {
      parentSplit.setBottomComponent(split);
    }
    parentSplit.validate();
  } else {
    parent.remove(this);
    CustomSplitPane split = new CustomSplitPane(orientation, this, this.duplicate());
    parent.add(split);
    parent.validate();
  }
}

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

jScrollPane2.setViewportView(resultTextPane);
jSplitPane1.setBottomComponent(jScrollPane2);

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

jSplitPane2.setResizeWeight(0.5);
jSplitPane2.setLeftComponent(userChatPanel);
jSplitPane2.setBottomComponent(gameChatPanel);

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

private void processComponentAdded() {
  if (getComponentCount() == ZERO_CONTENT_COUNT + 1) {
    if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) {
      parentComponent.setLeftComponent(this);
    }
    else {
      parentComponent.setBottomComponent(this);
    }
  }
}

代码示例来源:origin: sarahtattersall/PIPE

/**
 * Creates a new currentAnimationView text area, and returns a reference to it
 */
private void createAnimationViewPane() {
  AnimationHistoryView animationHistoryView = histories.get(getCurrentTab());
  scroller = new JScrollPane(animationHistoryView);
  scroller.setBorder(new EmptyBorder(0, 0, 0, 0));
  moduleAndAnimationHistoryFrame.setBottomComponent(scroller);
  moduleAndAnimationHistoryFrame.setDividerLocation(0.5);
  moduleAndAnimationHistoryFrame.setDividerSize(8);
}

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

private void processComponentRemoved() {
    if (getComponentCount() == ZERO_CONTENT_COUNT) {
      if (locationInParent.equals(JSplitPane.LEFT) || locationInParent.equals(JSplitPane.TOP)) {
        parentComponent.setTopComponent(null);
      }
      else {
        parentComponent.setBottomComponent(null);
      }
    }
  }
}

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

public void splitHorizontally(View rightView) {
  rightView.setSyncronizing(false);
  JSplitPane sp = createSplitPane(JSplitPane.VERTICAL_SPLIT);
  View view = (View) getComponent(0);
  remove(view);
  add(sp);
  validate();
  sp.setTopComponent(new ViewContainer(view));
  sp.setBottomComponent(new ViewContainer(rightView));
  sp.setDividerLocation(sp.getHeight() / 2);
}

相关文章

JSplitPane类方法