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

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

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

JSplitPane.setOrientation介绍

暂无

代码示例

代码示例来源:origin: org.codehaus.groovy/groovy

private void jbInit(Reader reader) throws Exception {
  final Border border = BorderFactory.createEmptyBorder();
  jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT);
  tokenPane.setEditable(false);
  tokenPane.setText("");
  scriptPane.setFont(new java.awt.Font("DialogInput", 0, 12));
  scriptPane.setEditable(false);
  scriptPane.setMargin(new Insets(5, 5, 5, 5));
  scriptPane.setText("");
  jScrollPane1.setBorder(border);
  jScrollPane2.setBorder(border);
  jSplitPane1.setMinimumSize(new Dimension(800, 600));
  mainPanel.add(jSplitPane1, BorderLayout.CENTER);
  if (reader == null) {
    mainPanel.add(jbutton, BorderLayout.NORTH);
  }
  this.getContentPane().add(mainPanel);
  jSplitPane1.add(jScrollPane1, JSplitPane.LEFT);
  jScrollPane1.getViewport().add(tokenPane, null);
  jSplitPane1.add(jScrollPane2, JSplitPane.RIGHT);
  jScrollPane2.getViewport().add(scriptPane, null);
  jScrollPane1.setColumnHeaderView(new JLabel(" Token Stream:"));
  jScrollPane2.setColumnHeaderView(new JLabel(" Input Script:"));
  jSplitPane1.setResizeWeight(0.5);
}

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

splitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
topPanel.setLayout(new java.awt.BorderLayout());

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

tableViewerSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
tableViewerSplitPane.setLeftComponent(_logTableScrollPane);
tableViewerSplitPane.setRightComponent(detailTAScrollPane);

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

public void setOrientation(boolean limitedBuildingOrientation) {
  if (limitedBuildingOrientation) {
    deckAreaSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    if (dividerLocationLimited != 0) {
      deckAreaSplitPane.setDividerLocation(dividerLocationLimited);
    }
  } else {
    deckAreaSplitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
    if (dividerLocationNormal != 0) {
      deckAreaSplitPane.setDividerLocation(dividerLocationNormal);
    }
  }
}

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

splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);  // we want it to split the window verticaly
splitPane.setDividerLocation(200);                    // the initial position of the divider is 200 (our window is 400 pixels high)

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

txtTimeRemaining = new javax.swing.JTextField();
jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setResizeWeight(0.5);
jSplitPane1.setTopComponent(cardSelector);

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

jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setResizeWeight(0.5);

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

jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
queryTextPane.setFont(new java.awt.Font("Courier New", 0, 12));
queryTextPane.setText("");

代码示例来源:origin: camunda/camunda-bpm-platform

tableViewerSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
tableViewerSplitPane.setLeftComponent(_logTableScrollPane);
tableViewerSplitPane.setRightComponent(detailTAScrollPane);

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

jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane1.setResizeWeight(0.25);

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

feedbackPanel.setHelperPanel(helper);
jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPane2.setResizeWeight(0.5);
jSplitPane2.setLeftComponent(userChatPanel);

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

jSplitPaneTables.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
jSplitPaneTables.setResizeWeight(0.5);

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

@Override
public void setOrientation(int orientation) {
  super.setOrientation(orientation);
  // Maintain the divider's proportional location
  updateDividerLocation();
}

代码示例来源: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: net.sf.squirrel-sql/squirrel-sql

@Override
  public void propertyChange(PropertyChangeEvent evt) {
    if(SessionProperties.IPropertyNames.SQL_PANEL_ORIENTATION.equals(evt.getPropertyName())){
      saveOrientationDependingDividerLocation();
      _splitPane.setOrientation((Integer) evt.getNewValue());
      _splitPane.setDividerLocation(calculateDividerLocation(_splitPane.getOrientation(), false));
      _splitPane.repaint();
    }
  }
});

代码示例来源:origin: realXuJiang/bigtable-sql

@Override
  public void propertyChange(PropertyChangeEvent evt) {
    if(SessionProperties.IPropertyNames.SQL_PANEL_ORIENTATION.equals(evt.getPropertyName())){
      saveOrientationDependingDividerLocation();
      _splitPane.setOrientation((Integer) evt.getNewValue());
      _splitPane.setDividerLocation(calculateDividerLocation(_splitPane.getOrientation(), false));
      _splitPane.repaint();
    }
  }
});

代码示例来源:origin: fr.ifremer/isis-fish

protected void createSplit() {
  $objectMap.put("split", split = new JSplitPane());
  
  split.setName("split");
  split.setOneTouchExpandable(true);
  split.setOrientation(0);
  split.setResizeWeight(0.8);
}

代码示例来源:origin: fr.ifremer/isis-fish

protected void createSplitPane2() {
  $objectMap.put("splitPane2", splitPane2 = new JSplitPane());
  
  splitPane2.setName("splitPane2");
  splitPane2.setOneTouchExpandable(true);
  splitPane2.setOrientation(1);
}

代码示例来源:origin: nativelibs4java/JNAerator

void switchOrientation() {
  boolean hor = sp.getOrientation() == JSplitPane.HORIZONTAL_SPLIT;
  int l = sp.getDividerLocation(), d = hor ? sp.getWidth() : sp.getHeight();
  sp.setOrientation(hor ? JSplitPane.VERTICAL_SPLIT : JSplitPane.HORIZONTAL_SPLIT);
  if (d != 0) {
    sp.setDividerLocation(l / (double) d);
  }
}
Action switchOrientationAction = new AbstractAction("Switch Orientation") {

代码示例来源:origin: nativelibs4java/JNAerator

protected static double getProportionalDividerLocation(JSplitPane sp) {
    boolean hor = sp.getOrientation() == JSplitPane.HORIZONTAL_SPLIT;
    int l = sp.getDividerLocation(), d = hor ? sp.getWidth() : sp.getHeight();
    sp.setOrientation(hor ? JSplitPane.VERTICAL_SPLIT : JSplitPane.HORIZONTAL_SPLIT);
    return d != 0 ? l / (double) d : 0.5;
  }
}

相关文章

JSplitPane类方法