本文整理了Java中javax.swing.JSplitPane.addHierarchyListener()
方法的一些代码示例,展示了JSplitPane.addHierarchyListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSplitPane.addHierarchyListener()
方法的具体详情如下:
包路径:javax.swing.JSplitPane
类名称:JSplitPane
方法名:addHierarchyListener
暂无
代码示例来源:origin: net.anwiba.commons/anwiba-commons-swing-core
public static void connect(final JSplitPane splitPane, final IPreferences preferences) {
final SplitPanePreferences splitPanePreferences = new SplitPanePreferences(
preferences.node(SplitPanePreferences.NAME));
splitPane.setDividerLocation(splitPanePreferences.getDividerLocation(splitPane.getDividerLocation()));
final SplitPanePreferenceUpdaterListener splitPaneUpdater = new SplitPanePreferenceUpdaterListener(
splitPane,
splitPanePreferences);
splitPane.addPropertyChangeListener(splitPaneUpdater);
splitPane.addHierarchyListener(splitPaneUpdater);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-highlight
vertical.addHierarchyListener(new HierarchyListener() {
private boolean show;
@Override
pane.addHierarchyListener(new HierarchyListener() {
private boolean show;
@Override
代码示例来源:origin: stackoverflow.com
public static JSplitPane setDividerLocation(final JSplitPane splitter, final double proportion) {
if (splitter.isShowing()) {
if ((splitter.getWidth() > 0) && (splitter.getHeight() > 0)) {
splitter.setDividerLocation(proportion);
} else {
splitter.addComponentListener(new ComponentAdapter() {
@Override
public void componentResized(ComponentEvent ce) {
splitter.removeComponentListener(this);
setDividerLocation(splitter, proportion);
}
});
}
} else {
splitter.addHierarchyListener(new HierarchyListener() {
@Override
public void hierarchyChanged(HierarchyEvent e) {
if (((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) && splitter.isShowing()) {
splitter.removeHierarchyListener(this);
setDividerLocation(splitter, proportion);
}
}
});
}
return splitter;
}
代码示例来源:origin: stackoverflow.com
jsplitpane.addHierarchyListener(new HierarchyListener()
内容来源于网络,如有侵权,请联系作者删除!