本文整理匯總了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());
}