javax.swing.JSplitPane#getDividerLocation ( )源码实例Demo

下面列出了javax.swing.JSplitPane#getDividerLocation ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: chipster   文件: SimpleInternalFrame.java
/**
 * 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");
	}
}
 
源代码2 项目: dragonwell8_jdk   文件: Test6657026.java
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);
    }
}
 
源代码3 项目: TencentKona-8   文件: Test6657026.java
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);
    }
}
 
源代码4 项目: jdk8u60   文件: Test6657026.java
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);
    }
}
 
源代码5 项目: openjdk-jdk8u   文件: Test6657026.java
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);
    }
}
 
源代码6 项目: marathonv5   文件: RSplitPane.java
@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();
}
 
源代码7 项目: marathonv5   文件: RSplitPane.java
@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());
}
 
源代码8 项目: openjdk-jdk8u-backup   文件: Test6657026.java
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);
    }
}
 
源代码9 项目: openjdk-jdk9   文件: Test6657026.java
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);
    }
}
 
源代码10 项目: jdk8u-jdk   文件: Test6657026.java
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);
    }
}
 
源代码11 项目: hottub   文件: Test6657026.java
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);
    }
}
 
源代码12 项目: openjdk-8-source   文件: Test6657026.java
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);
    }
}
 
源代码13 项目: openjdk-8   文件: Test6657026.java
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);
    }
}
 
源代码14 项目: jdk8u_jdk   文件: Test6657026.java
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);
    }
}
 
源代码15 项目: jdk8u-jdk   文件: Test6657026.java
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);
    }
}
 
源代码16 项目: jdk8u-dev-jdk   文件: Test6657026.java
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);
    }
}
 
源代码17 项目: pdfxtk   文件: Preferences.java
void          grab(JSplitPane cmp)  {location = cmp.getDividerLocation();}