Java Code Examples for javax.swing.JSplitPane#getDividerLocation()
The following examples show how to use
javax.swing.JSplitPane#getDividerLocation() .
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: SimpleInternalFrame.java From chipster with MIT License | 6 votes |
/** * Returns true if the frame is maximized * @return */ public boolean isMaximized(){ if(this.getParent() instanceof JSplitPane){ JSplitPane split = ((JSplitPane)this.getParent()); if(split.getTopComponent() == this){ if(split.getDividerLocation() == split.getHeight() - (gradientPanel.getHeight() + split.getDividerSize() + SPLIT_MARGIN)){ logger.debug("is a maximized top component"); return true; } else { logger.debug("is not a maximized component, but it is a top component"); return false; } } else { if(split.getDividerLocation() == gradientPanel.getHeight()){ logger.debug("is a maximized bottom component"); return true; } else { logger.debug("is not a maximized component, but is is a bottom component"); return false; } } } else { throw new IllegalStateException("SimpleInternalFrame is not on a split pane"); } }
Example 2
Source File: Test6657026.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 3
Source File: Test6657026.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 4
Source File: Test6657026.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 5
Source File: Test6657026.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 6
Source File: Test6657026.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 7
Source File: Test6657026.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 8
Source File: Test6657026.java From hottub with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 9
Source File: Test6657026.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 10
Source File: Test6657026.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 11
Source File: Test6657026.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 12
Source File: RSplitPane.java From marathonv5 with Apache License 2.0 | 5 votes |
@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 13
Source File: RSplitPane.java From marathonv5 with Apache License 2.0 | 5 votes |
@Override protected void mouseButton1Pressed(MouseEvent me) { JSplitPane c = (JSplitPane) (component instanceof JSplitPane ? component : SwingUtilities.getAncestorOfClass(JSplitPane.class, component)); if (c == null) { return; } dividerLocation = c.getDividerLocation(); }
Example 14
Source File: Test6657026.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 15
Source File: Test6657026.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 16
Source File: Test6657026.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static void test(JSplitPane pane, String action, int expected) { ActionEvent event = new ActionEvent(pane, expected, action); pane.getActionMap().get(action).actionPerformed(event); int actual = pane.getDividerLocation(); if (actual != expected) { throw new Error(actual + ", but expected " + expected); } }
Example 17
Source File: Preferences.java From pdfxtk with Apache License 2.0 | votes |
void grab(JSplitPane cmp) {location = cmp.getDividerLocation();}