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

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

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

JSplitPane.<init>介绍

暂无

代码示例

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

private JComponent createContentPane() {
  JComponent quickOpenPanel = createQuickOpenPanel();
  JPanel mainPanel = new JPanel(new BorderLayout());
  mainPanel.add(createToolBar(), BorderLayout.NORTH);
  mainPanel.add(createMiddlePanel(), BorderLayout.CENTER);
  mainPanel.add(createScorePanel(), BorderLayout.SOUTH);
  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, quickOpenPanel, mainPanel);
  splitPane.setOneTouchExpandable(true);
  splitPane.setResizeWeight(0.2);
  return splitPane;
}

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

/** Create content of this MainFrame. */
private void createContent() {
  setLayout(new BorderLayout());
  textArea = new JTextArea(20, 15);
  textArea.setEditable(false);
  final JScrollPane textAreaScrollPane = new JScrollPane(textArea);
  treeTable = new TreeTable(model.getParseTreeTableModel());
  treeTable.setEditor(textArea);
  treeTable.setLinePositionMap(model.getLinesToPosition());
  final JScrollPane treeTableScrollPane = new JScrollPane(treeTable);
  final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, treeTableScrollPane,
    textAreaScrollPane);
  add(splitPane, BorderLayout.CENTER);
  splitPane.setResizeWeight(0.7);
  add(createButtonsPanel(), BorderLayout.PAGE_END);
  pack();
}

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

JSplitPane controlSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, createCodeEditorPanel(),
    createXPathQueryPanel());
JSplitPane astAndSymbolTablePane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, createASTPanel(),
    createSymbolTableResultPanel());
JSplitPane resultsSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, astAndSymbolTablePane,
    createXPathResultPanel());
tabbed.setMnemonicAt(1, KeyEvent.VK_D);
JSplitPane containerSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, controlSplitPane, tabbed);
containerSplitPane.setContinuousLayout(true);
frame.getContentPane().add(containerSplitPane);
frame.setDefaultCloseOperation(exitOnClose ? JFrame.EXIT_ON_CLOSE : WindowConstants.DISPOSE_ON_CLOSE);

代码示例来源:origin: fossasia/neurolab-desktop

this.setSize(new Dimension(frameWidth, frameHeight));
softeningSlider.setPreferredSize(new Dimension(200, 30));
this.trackPanelGraphics = this.trackPanel.getGraphics();
this.toolsPanel = new JPanel();
this.toolsPanel.setBackground(Color.darkGray);
this.toolsPanel.setLayout(new GridLayout(1, 3));
JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, this.trackPanel, toolsPanel);
splitPane.setDividerLocation(border + trackHeight / 2);
this.add(splitPane);
JPanel feedbackSettingsPanel = new JPanel();
feedbackSettingsPanel.setBorder(BorderFactory.createTitledBorder("feedback: " ));
displaySettingsPanel.add(sliderPanel, BorderLayout.CENTER);
JPanel softeningPanel = new JPanel();
softeningPanel.setLayout(new BoxLayout(softeningPanel, BoxLayout.Y_AXIS));
JPanel analysisPanel = new JPanel();
analysisPanel.setBackground(new Color(50, 100, 100));
analysisPanel.setLayout(new BorderLayout());

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

content.setLayout(new BorderLayout());
JSplitPane verticalSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, inputAndMatchesPanel, displayMatchesPanel);
verticalSplit.setResizeWeight(.2);
this.add(verticalSplit, BorderLayout.CENTER);
if (screenSize.height > 800) { screenSize.height = 800; }
setPreferredSize(screenSize);
Dimension displayMatchesSize = new Dimension((int) (screenSize.getWidth()),(int) (screenSize.getHeight()*3/4.));
displayMatchesPanel.setPreferredSize(displayMatchesSize);

代码示例来源:origin: edu.utah.bmi.nlp/nlp-core

private void createVerticalSplitPane() {
  this.verticalSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  this.verticalSplitPane.setResizeWeight(0.8);
  this.verticalSplitPane.setPreferredSize(new Dimension(620, 600));
  this.verticalSplitPane.setMinimumSize(new Dimension(200, 200));
  // add JTextPane to top of vertical split pane
  this.createTextScrollPane();
  this.verticalSplitPane.setTopComponent(this.textScrollPane);
  // bottom pane is the legend, with checkboxes
  this.verticalSplitPane.setBottomComponent(this.createTabbedChoicePane());
}

代码示例来源:origin: nroduit/Weasis

private void jbInit() {
  this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
  jPanelMain.setLayout(borderLayout2);
  jButtonClose.addActionListener(e -> cancel());
  jButtonClose.setText(Messages.getString("AbstractWizardDialog.close")); //$NON-NLS-1$
  jPanelRootPanel.setLayout(borderLayout3);
  jPanelButtom.setLayout(gridBagLayout1);
  JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jScrollPane1, jPanelMain);
  jPanelRootPanel.add(splitPane, BorderLayout.CENTER);
  jPanelMain.add(jScrollPanePage, BorderLayout.CENTER);
  jPanelRootPanel.add(jPanelButtom, BorderLayout.SOUTH);
  jPanelButtom.add(jButtonClose, new GridBagConstraints(5, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST,
    GridBagConstraints.NONE, new Insets(10, 10, 10, 15), 0, 0));
  jScrollPane1.setViewportView(tree);
  this.getContentPane().add(jPanelRootPanel, null);
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/hibernate

private JSplitPane createSplitPane()
{
 treeTypes = new JTree(new DefaultMutableTreeNode());
 treeTypes.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
 pnlResults = new JPanel(new GridLayout(1,1));
 final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(treeTypes), pnlResults);
 Runnable runnable = new Runnable()
 {
   public void run()
   {
    splitPane.setLastDividerLocation(getWidth() / 2 );
   }
 };
 SwingUtilities.invokeLater(runnable);
 return splitPane;
}

代码示例来源:origin: triplea-game/triplea

private void layoutComponents() {
 final Container content = this;
 content.setLayout(new BorderLayout());
 final JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
 split.setLeftComponent(chatMessagePanel);
 split.setRightComponent(chatPlayerPanel);
 split.setOneTouchExpandable(false);
 split.setDividerSize(DIVIDER_SIZE);
 split.setResizeWeight(1);
 content.add(split, BorderLayout.CENTER);
}

代码示例来源:origin: org.apache.accumulo/examples-simple

public void init() throws TableNotFoundException {
 DefaultMutableTreeNode root = new DefaultMutableTreeNode(new NodeInfo(topPath, q.getData(topPath)));
 populate(root);
 populateChildren(root);
 
 treeModel = new DefaultTreeModel(root);
 tree = new JTree(treeModel);
 tree.addTreeExpansionListener(this);
 tree.addTreeSelectionListener(this);
 text = new JTextArea(getText(q.getData(topPath)));
 data = new JTextArea("");
 JScrollPane treePane = new JScrollPane(tree);
 JScrollPane textPane = new JScrollPane(text);
 dataPane = new JScrollPane(data);
 JSplitPane infoSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, textPane, dataPane);
 JSplitPane mainSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treePane, infoSplitPane);
 mainSplitPane.setDividerLocation(300);
 infoSplitPane.setDividerLocation(150);
 getContentPane().add(mainSplitPane, BorderLayout.CENTER);
}

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

btnCancel = new javax.swing.JButton();
btnStart = new javax.swing.JButton();
jSplitPane1 = new javax.swing.JSplitPane();
jScrollPane1 = new javax.swing.JScrollPane();
jTableSeats = new javax.swing.JTable();
chatPanel = new mage.client.chat.ChatPanelBasic();

代码示例来源:origin: wiztools/rest-client

this.setLayout(new BorderLayout());
JSplitPane jsp_main = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
jsp_main.setDividerSize(5);
jsp_main.add(initUIRequest());

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

splitPane = new JSplitPane();
splitPane.setUI(new BasicSplitPaneUI() {
  public void paint (Graphics g, JComponent jc) {
getContentPane().add(splitPane, BorderLayout.CENTER);
  JSplitPane rightSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  rightSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
    JPanel propertiesPanel = new JPanel(new GridBagLayout());
    rightSplit.add(propertiesPanel, JSplitPane.TOP);
    propertiesPanel.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(3, 0, 6, 6), BorderFactory
      .createTitledBorder("Editor Properties")));
        editRowsPanel = new JPanel(new GridBagLayout());
        scroll.setViewportView(editRowsPanel);
        scroll.getVerticalScrollBar().setUnitIncrement(70);
  JSplitPane leftSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  leftSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
  splitPane.add(leftSplit, JSplitPane.LEFT);
    JPanel emittersPanel = new JPanel(new BorderLayout());
    leftSplit.add(emittersPanel, JSplitPane.TOP);
    emittersPanel.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(0, 6, 6, 0), BorderFactory

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

public JTextPane getReport() {
  // SplitPane them
  JSplitPane splitOverviewPersonnel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, getCombatPersonnelReport(), getSupportPersonnelReport());
  splitOverviewPersonnel.setName("splitOverviewPersonnel");
  splitOverviewPersonnel.setOneTouchExpandable(true);
  splitOverviewPersonnel.setResizeWeight(0.5);
  
  // Actual report pane
  JTextPane txtReport = new JTextPane();
  txtReport.setMinimumSize(new Dimension(800, 500));
  txtReport.insertComponent(splitOverviewPersonnel);
  return txtReport;
}

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

jSplitPane1 = new javax.swing.JSplitPane();
jScrollPanePlayers = new javax.swing.JScrollPane();
jTablePlayers = new MageTable(tableInfo);
jTabbedPaneText = new javax.swing.JTabbedPane();
jScrollPaneTalk = new mage.client.chat.ChatPanelSeparated();
jScrollPaneSystem = new javax.swing.JScrollPane();
colorPaneSystem = new mage.client.components.ColorPane();

代码示例来源:origin: javalite/jar-explorer

/**
 * Actual GUI method
 */
public JarExplorer() {
  super(APP_NAME);
  GUIUtil.setMainFrame(this);
  mainSp = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
      jarFilePanel = new JarFilePanel(),
      resultsPanel = new SearchResultsPanel());
  getContentPane().add(buildToolBar(), BorderLayout.NORTH);
  getContentPane().add(mainSp, BorderLayout.CENTER);
  getContentPane().add(progressBar = new JProgressBar(JProgressBar.HORIZONTAL), BorderLayout.SOUTH);
  progressBar.setStringPainted(true);
  buildMenu();
  addActionListeners();
}

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

splitPane = new JSplitPane();
splitPane.setUI(new BasicSplitPaneUI() {
  public void paint (Graphics g, JComponent jc) {
getContentPane().add(splitPane, BorderLayout.CENTER);
  JSplitPane rightSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  rightSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
    JPanel propertiesPanel = new JPanel(new GridBagLayout());
    rightSplit.add(propertiesPanel, JSplitPane.TOP);
    propertiesPanel.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(3, 0, 6, 6), BorderFactory
      .createTitledBorder("Editor Properties")));
        editRowsPanel = new JPanel(new GridBagLayout());
        scroll.setViewportView(editRowsPanel);
        scroll.getVerticalScrollBar().setUnitIncrement(70);
  JSplitPane leftSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
  leftSplit.setUI(new BasicSplitPaneUI() {
    public void paint (Graphics g, JComponent jc) {
  splitPane.add(leftSplit, JSplitPane.LEFT);
    JPanel emittersPanel = new JPanel(new BorderLayout());
    leftSplit.add(emittersPanel, JSplitPane.TOP);
    emittersPanel.setBorder(new CompoundBorder(BorderFactory.createEmptyBorder(0, 6, 6, 0), BorderFactory

相关文章

JSplitPane类方法