本文整理汇总了Java中javax.swing.JSplitPane.addPropertyChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java JSplitPane.addPropertyChangeListener方法的具体用法?Java JSplitPane.addPropertyChangeListener怎么用?Java JSplitPane.addPropertyChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JSplitPane
的用法示例。
在下文中一共展示了JSplitPane.addPropertyChangeListener方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initAssetsComponent
import javax.swing.JSplitPane; //导入方法依赖的package包/类
private static Component initAssetsComponent() {
JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
AssetTree tree = new AssetTree();
split.setLeftComponent(tree);
assetPanel = new AssetPanel();
JScrollPane scrollPane = new JScrollPane(assetPanel);
split.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, evt -> userPreferences.setAssetsSplitter(split.getDividerLocation()));
split.setDividerLocation(userPreferences.getMainSplitterPosition() != 0 ? userPreferences.getAssetsSplitter() : 200);
split.setRightComponent(scrollPane);
return split;
}
示例2: SplitCompilationViewer
import javax.swing.JSplitPane; //导入方法依赖的package包/类
public SplitCompilationViewer(CompilationViewer firstViewer, CompilationViewer secondViewer) {
splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
firstPanel = createComponent(firstViewer);
secondPanel = createComponent(secondViewer);
splitPane.add(firstPanel);
splitPane.add(secondPanel);
splitPane.addPropertyChangeListener(splitChanged);
splitPane.setDividerLocation(getLastDividerLocation());
combinedLookup = new ProxyLookup(firstViewer.getLookup(), secondViewer.getLookup());
}