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

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

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

JSplitPane.setContinuousLayout介绍

暂无

代码示例

代码示例来源:origin: MovingBlocks/Terasology

verticalSplitPane.setContinuousLayout(true);
verticalSplitPane.setResizeWeight(0.5);
getContentPane().add(verticalSplitPane, BorderLayout.CENTER);

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

containerSplitPane.setContinuousLayout(true);

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

JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
        treeScrollPane, scrollPane);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(400);
    splitPane.setContinuousLayout(true);

add(splitPane, "push, grow");

代码示例来源:origin: org.jspresso/jspresso-swing-application

/**
 * Creates a split pane.
 * 
 * @return the created split pane.
 */
protected JSplitPane createJSplitPane() {
 JSplitPane splitPane = new JSplitPane();
 splitPane.setContinuousLayout(true);
 splitPane.setOneTouchExpandable(true);
 return splitPane;
}

代码示例来源:origin: org.jspresso.framework/jspresso-swing-application

/**
 * Creates a split pane.
 *
 * @param viewDescriptor
 *     the component view descriptor.
 * @return the created split pane.
 */
protected JSplitPane createJSplitPane(ISplitViewDescriptor viewDescriptor) {
 JSplitPane splitPane = new JSplitPane();
 splitPane.setContinuousLayout(false);
 splitPane.setOneTouchExpandable(true);
 return splitPane;
}

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

public class SplitPaneDemo extends JFrame {
  public static void main(String[] args) {
    EventQueue.invokeLater(() -> new SplitPaneDemo());
  }

  SplitPaneDemo() {
    super("SplitPaneDemo");

    JLabel lhs = new JLabel("LHS");
    lhs.setPreferredSize(new Dimension(320, 200));

    JLabel rhs = new JLabel("RHS");
    rhs.setPreferredSize(new Dimension(320, 200));

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    splitPane.setContinuousLayout(true); // Update window as splitter is moved
    splitPane.setLeftComponent(lhs);
    splitPane.setRightComponent(rhs);

    setContentPane(splitPane);
    pack();
    setVisible(true);
  }
}

代码示例来源:origin: org.zaproxy/zap

private JSplitPane createSplitPane(int orientation) {
    final JTabbedPane tabbedPaneRequest = new JTabbedPane();
    tabbedPaneRequest.addTab(REQUEST_CAPTION, null, requestPanel, null);

    final JTabbedPane tabbedPaneResponse = new JTabbedPane();
    tabbedPaneResponse.addTab(RESPONSE_CAPTION, null, responsePanel, null);
    
    final JSplitPane splitPane = new JSplitPane(orientation, tabbedPaneRequest, tabbedPaneResponse);
    splitPane.setDividerSize(3);
    splitPane.setResizeWeight(0.5d);
    splitPane.setContinuousLayout(false);
    splitPane.setDoubleBuffered(true);
    
    int dividerLocation;
    if (orientation == JSplitPane.HORIZONTAL_SPLIT) {
      dividerLocation = horizontalDividerLocation;
    } else {
      dividerLocation = verticalDividerLocation;
    }
    splitPane.setDividerLocation(dividerLocation);
    
    return splitPane;
  }
}

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

public JSplitPane createSplitPane() {
  JSplitPane pane = new JSplitPane();
  pane.setBorder(null);
  pane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
  pane.setContinuousLayout(true);
  pane.setOneTouchExpandable(true);
  pane.setResizeWeight(0.5);
  return pane;
}

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

public void assemble() {
  JSplitPane verticalSplit = new JSplitPane();
  verticalSplit.setBorder(null);
  verticalSplit.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
  verticalSplit.setRightComponent(textEditor);
  verticalSplit.setLeftComponent(stRulesPanel);
  verticalSplit.setContinuousLayout(false);
  verticalSplit.setOneTouchExpandable(true);
  verticalSplit.setResizeWeight(0.25);
  mainPanel = new JPanel(new BorderLayout());
  mainPanel.setBorder(null);
  mainPanel.add(toolbar.getToolbar(), BorderLayout.NORTH);
  //mainPanel.add(toolbarPanel, BorderLayout.NORTH);
  mainPanel.add(verticalSplit, BorderLayout.CENTER);
  setContentPanel(mainPanel);
}

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

/**
 * Init the continuous layout flag using the jEdit's property
 * appearance.continuousLayout
 *
 * @param split the split. It must never be null
 * @since jEdit 4.3pre9
 */
public static void initContinuousLayout(JSplitPane split)
{
  boolean continuousLayout = split.isContinuousLayout();
  if (continuousLayout != jEdit.getBooleanProperty("appearance.continuousLayout"))
    split.setContinuousLayout(!continuousLayout);
} //}}}

代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf

public Component create(Context context) {
    JSplitPane splitPane = new DebugSplitPane((Integer) context.get("newOrientation"));
    splitPane.setBorder(null);
    splitPane.setContinuousLayout(true);
    splitPane.setDividerSize(0);
    splitPane.setDividerLocation(300);
    splitPane.setLeftComponent(null);
    splitPane.setRightComponent(null);
    return splitPane;
  }
}

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

public CvPipelineEditor(CvPipeline pipeline) {
  this.pipeline = pipeline;
  setLayout(new BorderLayout(0, 0));
  JSplitPane inputAndOutputSplitPane = new JSplitPane();
  inputAndOutputSplitPane.setContinuousLayout(true);
  add(inputAndOutputSplitPane, BorderLayout.CENTER);
  pipelinePanel = new PipelinePanel(this);
  inputAndOutputSplitPane.setLeftComponent(pipelinePanel);
  resultsPanel = new ResultsPanel(this);
  inputAndOutputSplitPane.setRightComponent(resultsPanel);
  addHierarchyListener(new HierarchyListener() {
    @Override
    public void hierarchyChanged(HierarchyEvent e) {
      inputAndOutputSplitPane.setDividerLocation(0.25);
    }
  });
  process();
}

代码示例来源:origin: gurkenlabs/litiengine

private static Component initRenderSplitPanel(JPanel renderPanel, JFrame window) {
 JSplitPane renderSplitPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, renderPanel, initBottomPanel());
 if (userPreferences.getBottomSplitter() != 0) {
  renderSplitPanel.setDividerLocation(userPreferences.getBottomSplitter());
 } else {
  renderSplitPanel.setDividerLocation((int) (window.getSize().height * 0.75));
 }
 renderSplitPanel.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, evt -> userPreferences.setBottomSplitter(renderSplitPanel.getDividerLocation()));
 renderSplitPanel.setContinuousLayout(true);
 return renderSplitPanel;
}

代码示例来源:origin: org.zaproxy/zap

protected void initUi() {
  buttonShowView = new JToggleButton(DisplayUtils.getScaledIcon(new ImageIcon(RequestSplitComponent.class.getResource("/resource/icon/view_split.png"))));
  buttonShowView.setToolTipText(BUTTON_TOOL_TIP);
  
  panelOptions = new JPanel();
  
  panelOptions.add(headerViews.getSelectableViewsComponent());
  panelOptions.add(bodyViews.getSelectableViewsComponent());
  
  headerViews.addView(createHttpPanelHeaderTextView());
  
  splitMain = new JSplitPane();
  splitMain.setDividerSize(3);
  splitMain.setResizeWeight(0.5d);
  splitMain.setContinuousLayout(false);
  splitMain.setOrientation(JSplitPane.VERTICAL_SPLIT);
  
  splitMain.setTopComponent(headerViews.getViewsPanel());
  splitMain.setBottomComponent(bodyViews.getViewsPanel());
  
  initViews();
  panelMain = new JPanel(new BorderLayout());
  panelMain.add(splitMain, BorderLayout.CENTER);
  
  setSelected(false);
}

代码示例来源:origin: org.zaproxy/zap

private void splitResponsePanelWithWorkTabbedPanel(int orientation) {
  responseTabbedPanel.removeAll();
  String name = showTabNames ? responsePanel.getName() : "";
  responseTabbedPanel.addTab(name, DisplayUtils.getScaledIcon(responsePanel.getIcon()), responsePanel);
  getPaneWork().removeAll();
  JSplitPane split = new JSplitPane(orientation);
  split.setDividerSize(3);
  split.setResizeWeight(0.5D);
  split.setContinuousLayout(false);
  split.setDoubleBuffered(true);
  split.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
  split.setRightComponent(responseTabbedPanel);
  split.setLeftComponent(getTabbedWork());
  getPaneWork().add(split);
  getPaneWork().validate();
}

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

/**
 * Create the user interface.
 */
private void createGUI()
{
  setLayout(new BorderLayout());
  _tree = new ObjectTree(_session);
  _splitPane.setOneTouchExpandable(true);
  _splitPane.setContinuousLayout(true);
 LeftPanel leftPanel = new LeftPanel();
 leftPanel.setMinimumSize(new Dimension(50,50));
 _splitPane.add(leftPanel, JSplitPane.LEFT);
  add(_splitPane, BorderLayout.CENTER);
  _splitPane.setDividerLocation(200);
  _tree.setSelectionRow(0);
}

代码示例来源:origin: RPTools/maptool

public AssetPanel(String controlName, AssetPanelModel model, int splitPaneDirection) {
  assetPanelModel = model;
  model.addImageUpdateObserver(this);
  assetTree = new AssetTree(this);
  createImagePanel();
  JSplitPane splitPane = new JSplitPane(splitPaneDirection);
  splitPane.setContinuousLayout(true);
  splitPane.setTopComponent(new JScrollPane(assetTree));
  splitPane.setBottomComponent(createSouthPanel());
  splitPane.setDividerLocation(100);
  new SplitPanePreferences(AppConstants.APP_NAME, controlName, splitPane);
  new TreePreferences(AppConstants.APP_NAME, controlName, assetTree);
  setLayout(new GridLayout());
  add(splitPane);
}

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

/**
 * Create the user interface.
 */
private void createGUI()
{
  setLayout(new BorderLayout());
  _tree = new ObjectTree(_session);
  _splitPane.setOneTouchExpandable(true);
  _splitPane.setContinuousLayout(true);
 LeftPanel leftPanel = new LeftPanel();
 leftPanel.setMinimumSize(new Dimension(50,50));
 _splitPane.add(leftPanel, JSplitPane.LEFT);
  add(_splitPane, BorderLayout.CENTER);
  _splitPane.setDividerLocation(200);
  _tree.setSelectionRow(0);
}

相关文章

JSplitPane类方法