Package javax.swing

Examples of javax.swing.JSplitPane$AccessibleJSplitPane


    splitPaneInfo.addProperty("resizeWeight", "double", new Double(0.5));
  };

  public SplitPane(Widget parent, String name) throws GUIException {
    super(parent, name);
    splitPane = new JSplitPane();
    splitPane.setOneTouchExpandable(true);
    splitPane.setContinuousLayout(true);
  }
View Full Code Here


    final JPanel toolbar = new JPanel();
    toolbar.setLayout(new BorderLayout());
    toolbar.add(new JScrollPane(helpPane));
    toolbar.setMinimumSize(new Dimension(100, 150));

    rootpane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    try
    {
      // An ugly way of calling
      //   rootpane.setResizeWeight(1);
      final Method m = rootpane.getClass().getMethod
View Full Code Here

    setTitle(resources.getString("config-description-editor.title")); //$NON-NLS-1$
    final JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());

    detailEditorPane = createEditPane();
    final JSplitPane splitPane = new JSplitPane
        (JSplitPane.HORIZONTAL_SPLIT, createEntryList(), detailEditorPane);

    contentPane.add(splitPane, BorderLayout.CENTER);
    contentPane.add(createButtonPane(), BorderLayout.SOUTH);
View Full Code Here

    final JScrollPane scroll = new JScrollPane(editorPane,
        JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

    final JButton previewButton = new ActionButton(getPreviewAction());

    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setTopComponent(scroll);
    splitPane.setBottomComponent(demoHandler.getPresentationComponent());
    content.add(splitPane, BorderLayout.CENTER);
    content.add(previewButton, BorderLayout.SOUTH);
    return content;
  }
View Full Code Here

        demoSelector);
    final DefaultTreeModel model = new DefaultTreeModel(root);
    final JTree demoTree = new JTree(model);
    demoTree.addTreeSelectionListener(new TreeSelectionHandler());

    JSplitPane rootSplitPane =
        new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
            new JScrollPane(demoTree), rootContent);
    rootSplitPane.setContinuousLayout(true);
    rootSplitPane.setDividerLocation(200);
    rootSplitPane.setOneTouchExpandable(true);
    return rootSplitPane;
  }
View Full Code Here

    final URL url = demoHandler.getDemoDescriptionSource();
    final JComponent scroll = createDescriptionTextPane(url);

    final JButton previewButton = new ActionButton(getPreviewAction());

    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setTopComponent(scroll);
    splitPane.setBottomComponent(demoHandler.getPresentationComponent());
    splitPane.setDividerLocation(200);
    splitPane.setOneTouchExpandable(true);
    content.add(splitPane, BorderLayout.CENTER);
    content.add(previewButton, BorderLayout.SOUTH);
    return content;
  }
View Full Code Here

    }

    public void setupMainPanel() {
        //System.out.println("setupMainPanel");
        //splitPane = new com.jgoodies.uif_lite.component.UIFSplitPane(JSplitPane.VERTICAL_SPLIT);
        splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        splitPane.setDividerSize(GUIGlobals.SPLIT_PANE_DIVIDER_SIZE);
        // We replace the default FocusTraversalPolicy with a subclass
        // that only allows FieldEditor components to gain keyboard focus,
        // if there is an entry editor open.
        /*splitPane.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy() {
View Full Code Here

    if (mode == SPLIT) {
      if (firstSplitBorder == null) {
        firstSplitBorder = createSplitBorder(c, name);
        if (tabPane != null) { // there is alrady one tab pane
          removeAll();
          tabSplit = new JSplitPane(orientation, tabPane, firstSplitBorder);
          elements.add(index, createElement(c, name, tabSplit,firstSplitBorder));
          add(tabSplit);
        } else { // we dont need a split yet
          elements.add(index, createElement(c, name, firstSplitBorder,firstSplitBorder));
          add(firstSplitBorder);
        }
      } else {
        // there is split area, add this panel to it
        Element p=getElement(firstSplitBorder.comp);
        if (p.owner == p.border) {
          // first split to be created
          removeAll();
          SplitBorder sb=createSplitBorder(c, name);
          JSplitPane sp= new JSplitPane(orientation, p.border, sb);
          p.owner = sp;
          elements.add(index, createElement(c, name, sp,sb));
          add(sp);
        }
        else{
          JSplitPane prev=(JSplitPane)p.owner;
          while(prev.getRightComponent() instanceof JSplitPane){
            // go to latest split
            prev=(JSplitPane)prev.getRightComponent();
          }
          SplitBorder right=(SplitBorder)prev.getRightComponent();
          p=getElement(right.comp);
          if(p.owner!=prev){ // cross check
            throw new RuntimeException(
            "SplitTabPane unexpected state : invalid owner "+p.comp+" "+p.owner);
          }
          SplitBorder sb=createSplitBorder(c, name);
          JSplitPane split = new JSplitPane(orientation, right,
                sb);
          p.owner = split;
          elements.add(index, createElement(c, name, split,sb));
          prev.setRightComponent(split);
        }
      }
    } else if(mode==TAB) {
      if (tabPane == null) {
        tabPane = new JTabbedPane(
            orientation == JSplitPane.HORIZONTAL_SPLIT ? JTabbedPane.LEFT
                : JTabbedPane.TOP);
        tabPane.addMouseListener(this);
        if (firstSplitBorder == null) {
          // we dont need a split yet
          removeAll();
          add(tabPane);
        } else {
          removeAll();
          Element e=getElement(firstSplitBorder.comp);
          tabSplit = new JSplitPane(orientation, tabPane, e.owner);
          if(e.owner == e.border){
            e.owner=tabSplit;
          }
          add(tabSplit);
        }
View Full Code Here

      }
    } else if (e.owner == e.border) {
      removeAll();
      firstSplitBorder=null;
    } else if (e.owner instanceof JSplitPane) {
      JSplitPane sp = (JSplitPane) e.owner;
      if ((sp.getLeftComponent() instanceof SplitBorder)
          && ((SplitBorder) (sp.getLeftComponent())).comp == e.comp) {
        Component r=sp.getRightComponent();
        if(sp.getParent() instanceof JSplitPane){
          JSplitPane previous = (JSplitPane)sp.getParent();
          sp.removeAll();
          previous.setRightComponent(r);
          if(r instanceof SplitBorder){
            SplitBorder b=(SplitBorder)r;
            Element eb=(Element)getElement(b.comp);
            if(previous.getLeftComponent()==tabPane){
              firstSplitBorder=b;
            }
            eb.owner=previous;
          }
          else if(r instanceof JSplitPane){
          }
          else {
            throw new RuntimeException(
                "SplitTabPane unexpected state : right component = "+r);
          }
        }
        else if(sp.getParent()==this){
          sp.removeAll();
          removeAll();
          add(r);
          if(r instanceof SplitBorder){
            SplitBorder b=(SplitBorder)r;
            Element eb=(Element)getElement(b.comp);
            eb.owner=b;
            firstSplitBorder=b;
          }
          else if(r instanceof JSplitPane){
            firstSplitBorder=(SplitBorder)((JSplitPane)r).getLeftComponent();
          }
          else {
            throw new RuntimeException(
                "SplitTabPane unexpected state : right component = "+r);
          }
        }
        else{
          throw new RuntimeException(
          "SplitTabPane unexpected state : root split is not owned by this");
        }
      } else if ((sp.getRightComponent() instanceof SplitBorder)
          && ((SplitBorder) (sp.getRightComponent())).comp == e.comp) {
        Component left = sp.getLeftComponent();
        if (left instanceof JSplitPane) {
          throw new RuntimeException(
              "SplitTabPane unexpected state : left element is a split");
        } else {
          if (left == tabPane) {
            // remove the last split
            removeAll();
            if (tabPane != null) {
              add(tabPane);
            }
            if (firstSplitBorder.comp != e.comp) {
              throw new RuntimeException(
                  "SplitTabPane unexpected state : last split is inconsistent");
            }
            firstSplitBorder = null;
            tabSplit = null;
          } else {
            if(left instanceof SplitBorder){
              SplitBorder b=(SplitBorder)left;
              Element eb=(Element)getElement(b.comp);
              sp.removeAll();
              if(sp.getParent()==this){
                removeAll();
                add(left);
                firstSplitBorder=(SplitBorder)left;
                eb.owner=b;
              }
              else if(sp.getParent() instanceof JSplitPane){
                JSplitPane parent=(JSplitPane)sp.getParent();
                parent.setRightComponent(left);
                if(parent.getLeftComponent()==tabPane){
                  firstSplitBorder=(SplitBorder)left;
                }
                eb.owner=parent;
              }
              else{
View Full Code Here


        treeModel.reload();

        // Create global frame
        JSplitPane helpSlitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,helpTreePane ,scrollPane);
        helpSlitPane.setDividerLocation(300);
        Container content = getContentPane();
        content.setLayout(new BorderLayout());

        content.add(toolsBar, BorderLayout.NORTH);
        content.add(helpSlitPane, BorderLayout.CENTER);
View Full Code Here

TOP

Related Classes of javax.swing.JSplitPane$AccessibleJSplitPane

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.