public void propertyChange(PropertyChangeEvent evt) { if (AbstractDialogPage.ICON_PROPERTY.equals(evt.getPropertyName()) && treeNode instanceof MutableTreeNodeEx) { ((MutableTreeNodeEx) treeNode).setEnabled(dialogPage.isPageEnabled()); } } });
public void propertyChange(PropertyChangeEvent evt) { if (AbstractDialogPage.ICON_PROPERTY.equals(evt.getPropertyName()) && treeNode instanceof MutableTreeNodeEx) { ((MutableTreeNodeEx) treeNode).setEnabled(dialogPage.isPageEnabled()); } } });
public void contentsChanged(ListDataEvent e) { if (e.getSource() instanceof PageList) { Object o = ((PageList) e.getSource()).getSelectedItem(); if (o instanceof AbstractDialogPage && ((AbstractDialogPage) o).isPageEnabled()) { setCurrentPage((AbstractDialogPage) o); } } } });
public void contentsChanged(ListDataEvent e) { if (e.getSource() instanceof PageList) { Object o = ((PageList) e.getSource()).getSelectedItem(); if (o instanceof AbstractDialogPage && ((AbstractDialogPage) o).isPageEnabled()) { setCurrentPage((AbstractDialogPage) o); } } } });
public void valueChanged(TreeSelectionEvent e) { if (tree.getSelectionPath() == null) { return; } DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); // comment this while block if you want the parent page shows its own page instead of showing its first child page. while (!treeNode.isLeaf()) { final DefaultMutableTreeNode tn = treeNode; Runnable runnable = new Runnable() { public void run() { tree.expandPath(new TreePath(tn.getPath())); } }; SwingUtilities.invokeLater(runnable); treeNode = (DefaultMutableTreeNode) treeNode.getChildAt(0); } Object userObject = treeNode.getUserObject(); if (userObject instanceof AbstractDialogPage && !userObject.equals(getCurrentPage()) && ((AbstractDialogPage) userObject).isPageEnabled()) { setCurrentPage((AbstractDialogPage) userObject, tree); if (getCurrentPage() != userObject) { // TODO select the old path. } } } });
public void valueChanged(TreeSelectionEvent e) { if (tree.getSelectionPath() == null) { return; } DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent(); // comment this while block if you want the parent page shows its own page instead of showing its first child page. while (!treeNode.isLeaf()) { final DefaultMutableTreeNode tn = treeNode; Runnable runnable = new Runnable() { public void run() { tree.expandPath(new TreePath(tn.getPath())); } }; SwingUtilities.invokeLater(runnable); treeNode = (DefaultMutableTreeNode) treeNode.getChildAt(0); } Object userObject = treeNode.getUserObject(); if (userObject instanceof AbstractDialogPage && !userObject.equals(getCurrentPage()) && ((AbstractDialogPage) userObject).isPageEnabled()) { setCurrentPage((AbstractDialogPage) userObject, tree); if (getCurrentPage() != userObject) { // TODO select the old path. } } } });
((MutableTreeNodeEx) treeNode).setEnabled(dialogPage.isPageEnabled());
((MutableTreeNodeEx) treeNode).setEnabled(dialogPage.isPageEnabled());
final JideButton button = createIconButton(optionsPanel.getTitle(), optionsPanel.getIcon()); button.setToolTipText(optionsPanel.getDescription()); button.setEnabled(optionsPanel.isPageEnabled()); button.addActionListener(new AbstractAction() { private static final long serialVersionUID = -8913013217983540816L;
final JideButton button = createIconButton(optionsPanel.getTitle(), optionsPanel.getIcon()); button.setToolTipText(optionsPanel.getDescription()); button.setEnabled(optionsPanel.isPageEnabled()); button.addActionListener(new AbstractAction() { private static final long serialVersionUID = 4451059166068761678L;
page.addButtonListener(getButtonPanel()); _tabbedPane.addTab(page.getTitle(), page.getIcon(), page, page.getDescription()); _tabbedPane.setEnabledAt(i, page.isPageEnabled()); final int index = i; page.addPropertyChangeListener(new PropertyChangeListener() {
page.addButtonListener(getButtonPanel()); _tabbedPane.addTab(page.getTitle(), page.getIcon(), page, page.getDescription()); _tabbedPane.setEnabledAt(i, page.isPageEnabled()); final int index = i; page.addPropertyChangeListener(new PropertyChangeListener() {