Package javax.swing

Examples of javax.swing.JSplitPane


    } else {
      mActionsPane.setPreferredSize(pluginsSize);
    }

    if (ProgramInfo.getInstance().getSettings().getShowFunctions()) {
      JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
      split.setDividerSize(5);
      split.setContinuousLayout(true);
      split.setDividerLocation(mActionsPane.getPreferredSize().width + 1);
      split.setLeftComponent(mActionsPane);
      split.setRightComponent(scrollPane);
      mMainPanel.add(split, BorderLayout.CENTER);
      mFindAsYouType.installKeyListener(split);
    } else {
      final JButton functions = new JButton(mLocalizer.msg("functions",
          "Functions"));
View Full Code Here


    protected JComponent createMainPanel() {
        JPanel panel = new JPanel(new BorderLayout());
        panel.add(createNorthPanel(), BorderLayout.NORTH);
        panel.add(createMasterComponent(), BorderLayout.CENTER);

        JSplitPane split = new JSplitPane();
        split.setTopComponent(getDetailForm().getControl());
        split.setBottomComponent(panel);
        split.setOrientation(JSplitPane.VERTICAL_SPLIT);
        split.setDividerSize(8);
        split.setOneTouchExpandable(true);
        split.setResizeWeight(.5d);
//        split.setDividerLocation(0.3d);

        return split;
    }
View Full Code Here

      treeHolder.add(treeView, BorderLayout.CENTER);

      //m_perspectiveHolder.add(treeHolder, BorderLayout.WEST);


      JSplitPane p2 = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treeHolder, m_flowTabs);
      p2.setOneTouchExpandable(true);

      add(p2, BorderLayout.CENTER);

      Dimension d = treeView.getPreferredSize();
      d = new Dimension((int)(d.getWidth() * 1.5), (int)d.getHeight());
View Full Code Here

      m_logPanels.add(tabLogPanel);

      m_environmentSettings.add(new Environment());
      m_filePaths.add(new File("-NONE-"));

      JSplitPane p2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, p1, tabLogPanel);
      p2.setOneTouchExpandable(true);
      //p2.setDividerLocation(500);
      p2.setDividerLocation(0.7);
      p2.setResizeWeight(1.0);
      JPanel splitHolder = new JPanel();
      splitHolder.setLayout(new BorderLayout());
      splitHolder.add(p2, BorderLayout.CENTER);

      //add(splitHolder, BorderLayout.CENTER);
View Full Code Here

  public void setComponents(Component[] components) {

    if (components.length == 1) {
      mComponent = components[0];
    } else if (components.length == 2) {
      final JSplitPane splitPane = new JSplitPane();
      splitPane.setContinuousLayout(true);
      splitPane.setOneTouchExpandable(true);
      splitPane.setLeftComponent(components[0]);
      splitPane.setRightComponent(components[1]);
      splitPane.setBorder(BorderFactory.createEmptyBorder());
      splitPane.addPropertyChangeListener("dividerLocation",
          new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
              if(!MainFrame.isStarting()) {
                int oldValue = ((Integer) evt.getOldValue()).intValue();
                int dividerLocation = ((Integer) evt.getNewValue()).intValue();
View Full Code Here

      onPropertiesChanged(properties);
  }

  protected void onPropertiesChanged(ViewProperty properties) {
    if (mComponent instanceof JSplitPane && properties instanceof SplitViewProperty) {
      JSplitPane splitPane = (JSplitPane)mComponent ;
      SplitViewProperty prop = (SplitViewProperty)properties;

      if (prop.getLeftComponentFixed()) {
        splitPane.setResizeWeight(0.0);
      }
      else {
        splitPane.setResizeWeight(1.0);
      }
      splitPane.setOrientation(prop.getVerticalSplit()?JSplitPane.VERTICAL_SPLIT:JSplitPane.HORIZONTAL_SPLIT);

      int abs = prop.getFixedComponentWidth();
     
      if (prop.getLeftComponentFixed()) {
        splitPane.setDividerLocation(abs);
      }
      else {
        int width = mComponent.getWidth();
        int height = mComponent.getHeight();
        int dividerLocation = (prop.getVerticalSplit()?height:width) - abs;
        splitPane.setDividerLocation(dividerLocation);
      }
    }
  }
View Full Code Here

  }

  public void storeProperties() {
    Property property = getProperty();
    if (property instanceof SplitViewProperty && mComponent instanceof JSplitPane && !MainFrame.isStarting()) {
      JSplitPane splitPane = (JSplitPane)mComponent;
      SplitViewProperty prop = (SplitViewProperty)property;
      Component comp;
      if (prop.getLeftComponentFixed()) {
        comp = splitPane.getLeftComponent();
      }
      else {
        comp = splitPane.getRightComponent();
      }

      if (comp != null) {
        if (prop.getVerticalSplit()) {
          prop.setFixedComponentWidth(comp.getHeight());
        }
        else {
          if(prop.getLeftComponentFixed()) {
            prop.setFixedComponentWidth(comp.getWidth());
          } else {
            prop.setFixedComponentWidth(comp.getWidth() + splitPane.getDividerSize());
          }
        }
      }
    }
View Full Code Here

    for (int i = 0; i < outerReportControllerHolder.getComponentCount(); i++)
    {
      final Component maybeSplitPane = outerReportControllerHolder.getComponent(i);
      if (maybeSplitPane instanceof JSplitPane)
      {
        final JSplitPane splitPane = (JSplitPane) maybeSplitPane;
        reportControllerSliderSize = splitPane.getDividerLocation();
        break;
      }
    }

    if (newReportController == null)
    {
      if (reportControllerComponent != null)
      {
        // thats relatively easy.
        outerReportControllerHolder.removeAll();
        outerReportControllerHolder.add(toolbarHolder, BorderLayout.NORTH);
        outerReportControllerHolder.add(reportPaneScrollPane, BorderLayout.CENTER);
        reportControllerComponent = null;
        reportControllerInner = false;
        reportControllerLocation = null;
      }
    }
    else
    {
      final JComponent rcp = newReportController.getControlPanel();
      if (rcp == null)
      {
        if (reportControllerComponent != null)
        {
          outerReportControllerHolder.removeAll();
          outerReportControllerHolder.add(toolbarHolder, BorderLayout.NORTH);
          outerReportControllerHolder.add(reportPaneScrollPane, BorderLayout.CENTER);
          reportControllerComponent = null;
          reportControllerInner = false;
          reportControllerLocation = null;
        }
      }
      else if (reportControllerComponent != rcp ||
          reportControllerInner != newReportController.isInnerComponent() ||
          ObjectUtilities.equal(reportControllerLocation, newReportController.getControllerLocation()) == false)
      {
        // if either the controller component or its position (inner vs outer)
        // and border-position has changed, then refresh ..
        this.reportControllerLocation = newReportController.getControllerLocation();
        this.reportControllerInner = newReportController.isInnerComponent();
        this.reportControllerComponent = newReportController.getControlPanel();

        outerReportControllerHolder.removeAll();
        if (reportControllerInner)
        {
          final JSplitPane innerHolder = new JSplitPane();
          innerHolder.setOpaque(false);
          if (BorderLayout.SOUTH.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.VERTICAL_SPLIT);
            innerHolder.setTopComponent(reportPaneScrollPane);
            innerHolder.setBottomComponent(reportControllerComponent);
          }
          else if (BorderLayout.EAST.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
            innerHolder.setLeftComponent(reportPaneScrollPane);
            innerHolder.setRightComponent(reportControllerComponent);
          }
          else if (BorderLayout.WEST.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
            innerHolder.setRightComponent(reportPaneScrollPane);
            innerHolder.setLeftComponent(reportControllerComponent);
          }
          else // if (BorderLayout.NORTH.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.VERTICAL_SPLIT);
            innerHolder.setBottomComponent(reportPaneScrollPane);
            innerHolder.setTopComponent(reportControllerComponent);
          }

          if (reportControllerSliderSize > 0)
          {
            innerHolder.setDividerLocation(reportControllerSliderSize);
          }
          outerReportControllerHolder.add(toolbarHolder, BorderLayout.NORTH);
          outerReportControllerHolder.add(innerHolder, BorderLayout.CENTER);
        }
        else
        {
          final JPanel reportPaneHolder = new JPanel();
          reportPaneHolder.setOpaque(false);
          reportPaneHolder.setLayout(new BorderLayout());
          reportPaneHolder.add(toolbarHolder, BorderLayout.NORTH);
          reportPaneHolder.add(reportPaneScrollPane, BorderLayout.CENTER);

          final JSplitPane innerHolder = new JSplitPane();
          if (BorderLayout.SOUTH.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.VERTICAL_SPLIT);
            innerHolder.setTopComponent(reportPaneHolder);
            innerHolder.setBottomComponent(reportControllerComponent);
          }
          else if (BorderLayout.EAST.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
            innerHolder.setLeftComponent(reportPaneHolder);
            innerHolder.setRightComponent(reportControllerComponent);
          }
          else if (BorderLayout.WEST.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
            innerHolder.setRightComponent(reportPaneHolder);
            innerHolder.setLeftComponent(reportControllerComponent);
          }
          else // if (BorderLayout.NORTH.equals(reportControllerLocation))
          {
            innerHolder.setOrientation(JSplitPane.VERTICAL_SPLIT);
            innerHolder.setBottomComponent(reportPaneHolder);
            innerHolder.setTopComponent(reportControllerComponent);
          }
          if (reportControllerSliderSize > 0)
          {
            innerHolder.setDividerLocation(reportControllerSliderSize);
          }
          outerReportControllerHolder.add(innerHolder, BorderLayout.CENTER);
        }
      }
    }
View Full Code Here

  {
    this.packageManager = packageManager;
    detailEditorPane = new ConfigEditorPanel();

    setLayout(new BorderLayout());
    final JSplitPane splitPane = new JSplitPane
        (JSplitPane.HORIZONTAL_SPLIT, createEntryTree(includeGlobals), detailEditorPane);
    splitPane.setDividerLocation(250);
    add(splitPane, BorderLayout.CENTER);
  }
View Full Code Here

    public OutputUILord getOutputUILord() {
      return outputPanelLord;
   }

   private Component createCenterPanel() {
        splitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT);

        splitter.setTopComponent( createMainGradlePanel());
        splitter.setBottomComponent( outputPanelLord.getMainPanel());

        splitter.setContinuousLayout(true);
View Full Code Here

TOP

Related Classes of javax.swing.JSplitPane

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.