List of usage examples for javax.swing JRadioButtonMenuItem getAction
public Action getAction()
Action
for this ActionEvent
source, or null
if no Action
is set. From source file:net.sf.vfsjfilechooser.filepane.VFSFilePane.java
private void updateViewMenu() { if (viewMenu != null) { Component[] components = viewMenu.getMenuComponents(); for (Component component : components) { if (component instanceof JRadioButtonMenuItem) { JRadioButtonMenuItem mi = (JRadioButtonMenuItem) component; if (((ViewTypeAction) mi.getAction()).viewType == viewType) { mi.setSelected(true); }/* w w w .j a v a 2 s.c om*/ } } } }
From source file:com.googlecode.vfsjfilechooser2.filepane.VFSFilePane.java
private void updateViewMenu() { if (viewMenu != null) { Component[] components = viewMenu.getMenuComponents(); for (Component component : components) { if (component instanceof JRadioButtonMenuItem) { JRadioButtonMenuItem mi = (JRadioButtonMenuItem) component; if (((ViewTypeAction) mi.getAction()).viewType == viewType) { mi.setSelected(true); }//from w w w . ja v a 2 s . com } else if (component instanceof JCheckBoxMenuItem) { JCheckBoxMenuItem mi = (JCheckBoxMenuItem) component; if (mi.getActionCommand().equals(ACTION_VIEW_HIDDEN)) mi.setSelected(getFileChooser().isFileHidingEnabled()); } } } }