本文整理汇总了Java中com.sun.swingset3.utilities.AnimatingSplitPane类的典型用法代码示例。如果您正苦于以下问题:Java AnimatingSplitPane类的具体用法?Java AnimatingSplitPane怎么用?Java AnimatingSplitPane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AnimatingSplitPane类属于com.sun.swingset3.utilities包,在下文中一共展示了AnimatingSplitPane类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createMainPanel
import com.sun.swingset3.utilities.AnimatingSplitPane; //导入依赖的package包/类
protected JComponent createMainPanel() {
// Create main panel with demo selection on left and demo/source on right
mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
// Create demo selector panel on left
demoSelectorPanel = new DemoSelectorPanel(demoListTitle, demoList);
demoSelectorPanel.setPreferredSize(new Dimension(DEMO_SELECTOR_WIDTH, MAIN_FRAME_HEIGHT));
demoSelectorPanel.addPropertyChangeListener(new DemoSelectionListener());
mainPanel.add(demoSelectorPanel, BorderLayout.WEST);
// Create splitpane on right to hold demo and source code
demoSplitPane = new AnimatingSplitPane(JSplitPane.VERTICAL_SPLIT);
demoSplitPane.setBorder(EMPTY_BORDER);
mainPanel.add(demoSplitPane, BorderLayout.CENTER);
// Create panel to contain currently running demo
demoContainer = new JPanel();
demoContainer.setLayout(new BorderLayout());
demoContainer.setBorder(PANEL_BORDER);
demoContainer.setPreferredSize(new Dimension(DEMO_PANEL_WIDTH, DEMO_PANEL_HEIGHT));
demoSplitPane.setTopComponent(demoContainer);
currentDemoPanel = demoPlaceholder;
demoContainer.add(demoPlaceholder, BorderLayout.CENTER);
// Create collapsible source code pane
codeViewer = new CodeViewer();
codeContainer = new JPanel(new BorderLayout());
codeContainer.add(codeViewer);
codeContainer.setBorder(PANEL_BORDER);
codeContainer.setMinimumSize(new Dimension(0,0));
demoSplitPane.setBottomComponent(codeContainer);
addPropertyChangeListener(new SwingSetPropertyListener());
// Create shareable popup menu for demo actions
popup = new JPopupMenu();
popup.add(new EditPropertiesAction());
popup.add(new ViewCodeSnippetAction());
return mainPanel;
}