javax.swing.JSplitPane Java Examples

The following examples show how to use javax.swing.JSplitPane. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DomGui.java    From DominionSim with MIT License 6 votes vote down vote up
private void initializeComponent()	{
  setJMenuBar( createMenu() );
  
     myVPLineChart = new DomLineChart(myEngine.getPlayers(), "VP");
  myBarChart = new DomBarChart(myEngine.getPlayers());
     myMoneyLineChart = new DomLineChart(myEngine.getPlayers(), "Money");

     myTopSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, new JScrollPane(getControlPanel()), myVPLineChart.getChartPanel());
     myBottomSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, myBarChart.getChartPanel(), myMoneyLineChart.getChartPanel());
  myBigSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true, myTopSplit, myBottomSplit);
     myBigSplit.setResizeWeight(0.8);
     myTopSplit.setResizeWeight(0.50);
     myBottomSplit.setResizeWeight(0.5);
     myBottomSplit.setDividerSize(5);
     myBigSplit.setDividerSize(5);
     myTopSplit.setDividerSize(5);

  add(myBigSplit);
}
 
Example #2
Source File: Test6657026.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()){
        throw new Error("unexpected traversal keys");
    }
    new JSplitPane() {
        public void setFocusTraversalKeys(int id, Set keystrokes) {
            keystrokes.clear();
            super.setFocusTraversalKeys(id, keystrokes);
        }
    };
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
        throw new Error("shared traversal keys");
    }
    KEYBOARD_DIVIDER_MOVE_OFFSET = -KEYBOARD_DIVIDER_MOVE_OFFSET;

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example #3
Source File: Test6657026.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws InterruptedException {
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()){
        throw new Error("unexpected traversal keys");
    }
    new JSplitPane() {
        public void setFocusTraversalKeys(int id, Set keystrokes) {
            keystrokes.clear();
            super.setFocusTraversalKeys(id, keystrokes);
        }
    };
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
        throw new Error("shared traversal keys");
    }
    KEYBOARD_DIVIDER_MOVE_OFFSET = -KEYBOARD_DIVIDER_MOVE_OFFSET;

    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new Test6657026());
    thread.start();
    thread.join();
}
 
Example #4
Source File: MotifSplitPaneDivider.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * overrides to hardcode the size of the divider
 * PENDING(jeff) - rewrite JSplitPane so that this ins't needed
 */
public void setDividerSize(int newSize) {
    Insets          insets = getInsets();
    int             borderSize = 0;
    if (getBasicSplitPaneUI().getOrientation() ==
        JSplitPane.HORIZONTAL_SPLIT) {
        if (insets != null) {
            borderSize = insets.left + insets.right;
        }
    }
    else if (insets != null) {
        borderSize = insets.top + insets.bottom;
    }
    if (newSize < pad + minimumThumbSize + borderSize) {
        setDividerSize(pad + minimumThumbSize + borderSize);
    } else {
        vThumbHeight = hThumbWidth = newSize - pad - borderSize;
        super.setDividerSize(newSize);
    }
}
 
Example #5
Source File: DataTypeSyncDialog.java    From ghidra with Apache License 2.0 6 votes vote down vote up
/**
 * Creates a data type synchronization dialog
 * @param plugin the data type manager plug-in
 * @param synchronizer the data type synchronizer for synchronizing a program and archive.
 * @param list the list of data types to be displayed to the user.
 * @param commit true means data types from the program data types are to be committed 
 * back to the associated data types in the archive. false means update the program data 
 * types with changes that were made in the archive.
 */
public DataTypeSyncDialog(DataTypeManagerPlugin plugin, String clientName, String sourceName,
		List<DataTypeSyncInfo> list, Set<DataTypeSyncInfo> preselectedInfos,
		String operationName, String title) {
	super(title, true);
	this.plugin = plugin;
	this.operationName = operationName;

	syncPanel = new DataTypeSyncPanel(list, preselectedInfos, this);
	comparePanel = new DataTypeComparePanel(clientName, sourceName);
	JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, syncPanel, comparePanel);
	splitPane.setResizeWeight(0.6);
	mainPanel = new JPanel(new BorderLayout());
	mainPanel.add(splitPane, BorderLayout.CENTER);
	addWorkPanel(mainPanel);
	initialize();
	createActions();
}
 
Example #6
Source File: TableEditorFrame.java    From jdal with Apache License 2.0 6 votes vote down vote up
public void init() {
	
	tableIcon = FormUtils.getIcon(tableIcon, DEFAULT_TABLE_ICON);
	for (TableEditor<?> editor : editors)
		editor.getPanel().setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
		
	list = new JList(editors);
	list.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 0));
	list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	list.setVisibleRowCount(-1);
	JScrollPane scroll = new JScrollPane(list);
	split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scroll, editorPanel);
	getContentPane().add(split);
	list.addListSelectionListener(this);
	list.setCellRenderer(new ListCellRenderer());
	list.setSelectedIndex(0);
	setSize(800, 600);
}
 
Example #7
Source File: UnitsPanel.java    From netcdf-java with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
/**
 *
 */
public UnitsPanel(PreferencesExt prefs) {
  this.prefs = prefs;

  unitDataset = new UnitDatasetCheck((PreferencesExt) prefs.node("unitDataset"));
  unitConvert = new UnitConvert((PreferencesExt) prefs.node("unitConvert"));
  dateFormatMark = new DateFormatMark((PreferencesExt) prefs.node("dateFormatMark"));

  split2 = new JSplitPane(JSplitPane.VERTICAL_SPLIT, unitConvert, dateFormatMark);
  split2.setDividerLocation(prefs.getInt("splitPos2", 500));

  split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(unitDataset), split2);
  split.setDividerLocation(prefs.getInt("splitPos", 500));

  setLayout(new BorderLayout());
  add(split, BorderLayout.CENTER);
}
 
Example #8
Source File: AnalysisPanelProvider.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
public JPanel get() {
  JPanel panel = new JPanel(new GridLayout(1, 1));
  panel.setOpaque(false);
  panel.setBorder(BorderFactory.createLineBorder(Color.gray));

  JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, initUpperPanel(), initLowerPanel());
  splitPane.setOpaque(false);
  splitPane.setDividerLocation(320);
  panel.add(splitPane);

  return panel;
}
 
Example #9
Source File: MultiSplitPaneUI.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMaximumDividerLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getMaximumDividerLocation(JSplitPane a) {
    int returnValue =
        ((SplitPaneUI) (uis.elementAt(0))).getMaximumDividerLocation(a);
    for (int i = 1; i < uis.size(); i++) {
        ((SplitPaneUI) (uis.elementAt(i))).getMaximumDividerLocation(a);
    }
    return returnValue;
}
 
Example #10
Source File: ImageORPanel.java    From Cognizant-Intelligent-Test-Scripter with Apache License 2.0 5 votes vote down vote up
private void init() {
    setLayout(new BorderLayout());
    splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setOneTouchExpandable(true);
    splitPane.setBottomComponent(objectTable);
    TreeSearch tSearch = TreeSearch.installForOR(objectTree.getTree());
    splitPane.setTopComponent(tSearch);
    splitPane.setResizeWeight(.5);
    splitPane.setDividerLocation(.5);
    add(splitPane);
}
 
Example #11
Source File: OQLControllerUI.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
private static void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
Example #12
Source File: JCompoundSplitPane.java    From visualvm with GNU General Public License v2.0 5 votes vote down vote up
public void mouseReleased(MouseEvent e) {
    SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                ((JSplitPane) getFirstComponent()).setResizeWeight(firstResizeWeight);
                ((JSplitPane) getSecondComponent()).setResizeWeight(secondResizeWeight);
            }
        });
}
 
Example #13
Source File: Test6657026.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void run() {
    SunToolkit.createNewAppContext();
    if (new JSplitPane().getFocusTraversalKeys(0).isEmpty()) {
        throw new Error("shared traversal keys");
    }
    JSplitPane pane = new JSplitPane();
    pane.setUI(this);

    createFocusListener().focusGained(null); // allows actions
    test(pane, "positiveIncrement", 3);
    test(pane, "negativeIncrement", 0);
}
 
Example #14
Source File: ChartTopComponent.java    From BART with MIT License 5 votes vote down vote up
private void initLayout()   {
    JSplitPane splitPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
    splitPanel.setDividerLocation(230);
    
    JScrollPane scrTextArea = new JScrollPane();
    scrTextArea.setBorder(new TitledBorder(new LineBorder(Color.BLACK),
            Bundle.HINT_ChartTopComponent_SCRPanelTitle(), 
             TitledBorder.CENTER,TitledBorder.TOP));
    scrTextArea.setPreferredSize(new Dimension(220, 300));
    scrTextArea.setViewportView(detailedLog);

    JScrollPane scrTable = new JScrollPane();
    scrTable.setBorder(new TitledBorder(new LineBorder(Color.BLACK),
            Bundle.HINT_ChartTopComponent_SCRPanelTable(), 
             TitledBorder.CENTER,TitledBorder.TOP));
    scrTable.setViewportView(cellChangesTable);
    
    JScrollPane scrTC = new JScrollPane();
    scrTC.setViewportView(panelChart);

    splitPanel.add(scrTextArea);
    splitPanel.add(scrTable);
    
    JPanel tmp = new JPanel(new BorderLayout());
    tmp.add(panelChart,BorderLayout.NORTH);
    tmp.add(splitPanel,BorderLayout.CENTER);
    JScrollPane tmpScr = new JScrollPane();
    tmpScr.setViewportView(tmp);

    add(tmpScr,BorderLayout.CENTER);
}
 
Example #15
Source File: GUIBrowser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private JSplitPane createUnderPane(JTree tree) {
    JTextArea toStringArea = new JTextArea();
    toStringArea.setLineWrap(true);
    toStringArea.setEditable(false);
    tree.addTreeSelectionListener(new ToStringListener(toStringArea));
    JSplitPane result = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
            new JScrollPane(tree),
            new JScrollPane(toStringArea));
    result.setOneTouchExpandable(true);
    result.setDividerSize(8);
    result.setDividerLocation(0.8);
    return result;
}
 
Example #16
Source File: ProcessingComponent.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
public ProcessingComponent() {
  mainPanel = new JPanel(new BorderLayout());

  mainPanel.setPreferredSize(new Dimension(600, 400));

  cbDiffMSn = GUIUtils.addCheckbox(mainPanel,
      "Use different settings for " + MSLevel.MSONE.toString() + " and "
          + MSLevel.MSMS.toString(),
      this, "CBX_DIFFMSN",
      "If enabled, MS^1 and MS^n processing will use different parameters. The currently used settings are highlighted in green.");
  cbDiffMSn.setSelected(
      DataPointProcessingManager.getInst().getProcessingParameters().isDifferentiateMSn());

  mainPanel.add(cbDiffMSn, BorderLayout.NORTH);

  setupTreeViews();
  split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tvProcessing, tvAllModules);
  initTreeListeners();
  mainPanel.add(split, BorderLayout.CENTER);
  split.setDividerLocation(300);

  buttonPanel = new JPanel(new FlowLayout());
  GUIUtils.addButton(buttonPanel, "Add", null, this, "BTN_ADD");
  GUIUtils.addButton(buttonPanel, "Remove", null, this, "BTN_REMOVE");
  GUIUtils.addButton(buttonPanel, "Set parameters", null, this, "BTN_SET_PARAMETERS");
  GUIUtils.addButton(buttonPanel, "Load", null, this, "BTN_LOAD");
  GUIUtils.addButton(buttonPanel, "Save", null, this, "BTN_SAVE");
  // GUIUtils.addButton(buttonPanel, "Set Default...", null, this,
  // "BTN_SET_DEFAULT");
  mainPanel.add(buttonPanel, BorderLayout.SOUTH);

  chooser = new FileChooser();
  chooser.setTitle("Select Processing Queue File");
  chooser.getExtensionFilters().add(new ExtensionFilter("XML files", XML_EXTENSION));

  SwingUtilities.invokeLater(() -> {
    this.setContent(mainPanel);
  });
}
 
Example #17
Source File: PSheet.java    From netbeans with Apache License 2.0 5 votes vote down vote up
/**
 * Overridden to handle our layout requirements
 */
public void doLayout() {
    Component[] c = getComponents();

    if (c.length > 0 && getWidth() >= 0 && getHeight() >= 0) {
        Insets ins = getInsets();
        c[0].setBounds(ins.left, ins.top, getWidth() - (ins.right + ins.left), getHeight() - ins.top + ins.bottom);

        if (c[0] instanceof JSplitPane && Boolean.TRUE.equals(firstSplit)) {
            JSplitPane pane = (JSplitPane) c[0];
            pane.setDividerLocation(0.80f);
            pane.resetToPreferredSizes();

            JComponent dc = findDescriptionComponent();

            if (dc != null) {
                if (dc.getHeight() > 0) {
                    firstSplit = Boolean.FALSE;
                }
            } else {
                firstSplit = Boolean.FALSE;
            }
        }

        if (c.length > 1) {
            throw new IllegalStateException("Hmm, something is wrong: " + Arrays.asList(c));
        }
    }
}
 
Example #18
Source File: JSplitPaneOverlapping.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
protected void prepareControls() {
    JFrame frame = new JFrame("SplitPane Mixing");
    JPanel p = new JPanel(new GridLayout());
    p.setPreferredSize(new Dimension(500, 500));
    propagateAWTControls(p);
    sp1 = new JScrollPane(p);

    JButton button = new JButton("JButton");
    button.setBackground(Color.RED);
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            clicked = true;
        }
    });
    sp2 = new JScrollPane(button);

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sp1, sp2);
    splitPane.setOneTouchExpandable(false);
    splitPane.setDividerLocation(150);

    splitPane.setPreferredSize(new Dimension(400, 200));

    frame.getContentPane().add(splitPane);
    frame.pack();
    frame.setVisible(true);
}
 
Example #19
Source File: MultiSplitPaneUI.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMaximumDividerLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getMaximumDividerLocation(JSplitPane a) {
    int returnValue =
        ((SplitPaneUI) (uis.elementAt(0))).getMaximumDividerLocation(a);
    for (int i = 1; i < uis.size(); i++) {
        ((SplitPaneUI) (uis.elementAt(i))).getMaximumDividerLocation(a);
    }
    return returnValue;
}
 
Example #20
Source File: ConsolePanel.java    From zap-extensions with Apache License 2.0 5 votes vote down vote up
private void initialize() {
    this.setIcon(
            new ImageIcon(ZAP.class.getResource("/resource/icon/16/059.png"))); // 'script' icon
    this.setDefaultAccelerator(
            extension
                    .getView()
                    .getMenuShortcutKeyStroke(
                            KeyEvent.VK_C,
                            KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK,
                            false));
    this.setMnemonic(Constant.messages.getChar("scripts.panel.mnemonic"));
    this.setLayout(new BorderLayout());
    startPollingForChanges();

    runnableScriptsToThreadMap =
            Collections.synchronizedMap(
                    new HashMap<ScriptWrapper, WeakReference<ScriptExecutorThread>>());

    panelContent = new JPanel(new GridBagLayout());
    this.add(panelContent, BorderLayout.CENTER);

    JSplitPane splitPane = new JSplitPane();
    splitPane.setDividerSize(3);
    splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    splitPane.setResizeWeight(0.5D);
    splitPane.setTopComponent(getCommandPanel());
    splitPane.setBottomComponent(getOutputPanel());

    panelContent.add(this.getPanelToolbar(), LayoutHelper.getGBC(0, 0, 1, 1.0D, 0.0D));
    panelContent.add(splitPane, LayoutHelper.getGBC(0, 1, 1, 1.0D, 1.0D));
}
 
Example #21
Source File: MultiSplitPaneUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMinimumDividerLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getMinimumDividerLocation(JSplitPane a) {
    int returnValue =
        ((SplitPaneUI) (uis.elementAt(0))).getMinimumDividerLocation(a);
    for (int i = 1; i < uis.size(); i++) {
        ((SplitPaneUI) (uis.elementAt(i))).getMinimumDividerLocation(a);
    }
    return returnValue;
}
 
Example #22
Source File: FrameConfig.java    From JAVA-MVC-Swing-Monopoly with Apache License 2.0 5 votes vote down vote up
/**
 * 
 * ��ͼѡ�����
 * 
 */
private JPanel createMapSelectPanel() {
	JPanel jp = new JPanel();
	jp.setLayout(new GridLayout());
	jp.setBackground(new Color(235,236,237));
	JPanel lPane = new JPanel(new BorderLayout());
	String[] maps = { "\"LOVE��ͼ\"", "\"���ݵ�ͼ\"", "\"���˵�ͼ\"" };
	final ImageIcon[] maps1 = {
			new ImageIcon("images/other/1.png"),
			new ImageIcon("images/other/2.png"),
			new ImageIcon("images/other/3.png") };
	final JList jlst = new JList(maps);
	jlst.setSelectedIndex(0);
	final JLabel mapV = new JLabel(maps1[0]);
	final JButton ok = new JButton("ȷ��");
	ok.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed(ActionEvent arg0) {
			GameRunning.MAP = jlst.getSelectedIndex() + 1;
			ok.setText("��ѡ");
		}
	});
	jlst.addListSelectionListener(new ListSelectionListener() {
		@Override
		public void valueChanged(ListSelectionEvent e) {
			mapV.setIcon(maps1[jlst.getSelectedIndex()]);
			ok.setText("ȷ��");
		}
	});
	lPane.add(jlst);
	lPane.add(ok, BorderLayout.SOUTH);
	JPanel rPane = new JPanel();
	rPane.add(mapV);
	JSplitPane jSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
			false, lPane, rPane);
	jp.add(jSplitPane);
	return jp;
}
 
Example #23
Source File: JSplitPaneJavaElement.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
public List<IJavaElement> getByPseudoElement(String selector, Object[] params) {
    JSplitPane pane = (JSplitPane) component;
    if (selector.equals("left") || selector.equals("top")) {
        return Arrays.asList(JavaElementFactory.createElement(pane.getTopComponent(), getDriver(), getWindow()));
    } else if (selector.equals("right") || selector.equals("bottom")) {
        return Arrays.asList(JavaElementFactory.createElement(pane.getBottomComponent(), getDriver(), getWindow()));
    }
    return super.getByPseudoElement(selector, params);
}
 
Example #24
Source File: JSplitPaneOperator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Maps {@code JSplitPane.getMaximumDividerLocation()} through queue
 */
public int getMaximumDividerLocation() {
    return (runMapping(new MapIntegerAction("getMaximumDividerLocation") {
        @Override
        public int map() {
            return ((JSplitPane) getSource()).getMaximumDividerLocation();
        }
    }));
}
 
Example #25
Source File: RSFViewer2.java    From ramus with GNU General Public License v3.0 5 votes vote down vote up
public RSFViewer2(final Engine engine) {
    this.engine = engine;
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            try {
                ((FileIEngineImpl) engine.getDeligate()).close();
            } catch (IOException e1) {
                e1.printStackTrace();
            }
            System.exit(0);
        }
    });
    this.setTitle("Ramus files viewer sample 2");

    JSplitPane pane = new JSplitPane();

    pane.setLeftComponent(createQualifiersList());
    pane.setRightComponent(createTreeView());

    this.setContentPane(pane);

    this.pack();
    this.setSize(800, 600);
    this.setLocationRelativeTo(null);
}
 
Example #26
Source File: TasksRenderer.java    From swift-k with Apache License 2.0 5 votes vote down vote up
protected JComponent createFileStuff() {
	JSplitPane t = new JSplitPane(VERTICAL_SPLIT);
	t.setResizeWeight(0.5);
	t.setTopComponent(createTransferTable());
	t.setBottomComponent(createFileopTable());
	return t;
}
 
Example #27
Source File: MultiSplitPaneUI.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMaximumDividerLocation</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public int getMaximumDividerLocation(JSplitPane a) {
    int returnValue =
        ((SplitPaneUI) (uis.elementAt(0))).getMaximumDividerLocation(a);
    for (int i = 1; i < uis.size(); i++) {
        ((SplitPaneUI) (uis.elementAt(i))).getMaximumDividerLocation(a);
    }
    return returnValue;
}
 
Example #28
Source File: RSplitPane.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override
protected void mouseReleased(MouseEvent me) {
    JSplitPane c = (JSplitPane) (component instanceof JSplitPane ? component
            : SwingUtilities.getAncestorOfClass(JSplitPane.class, component));
    if (c == null || dividerLocation == c.getDividerLocation()) {
        return;
    }
    RComponent rComponent = new RComponentFactory(omapConfig).findRComponent(c, null, recorder);
    recorder.recordSelect(rComponent, "" + c.getDividerLocation());
}
 
Example #29
Source File: VisualisationFrameManager.java    From chipster with MIT License 5 votes vote down vote up
public JPanel getFramesPanel(){
	if(frameComponent == null){
		frameComponent = new SimpleInternalFrame("Visualisation");
		frameComponent.setToolBar(toolBar);
		split = new JSplitPane();
		split.setDividerLocation(0.5);
		split.setResizeWeight(0.5);
		this.updateInternalContent();
	} 
	return frameComponent; 
}
 
Example #30
Source File: SplitDocumentVerticallyAction.java    From netbeans with Apache License 2.0 5 votes vote down vote up
@Override
public final void actionPerformed(ActionEvent evt) {
    final TopComponent tc = WindowManager.getDefault().getRegistry().getActivated();

    if (tc != null) {
        SplitAction.splitWindow(tc, JSplitPane.VERTICAL_SPLIT, -1);
    }
}