List of usage examples for javax.swing JRadioButtonMenuItem getActionCommand
public String getActionCommand()
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); }//w ww . ja va2 s .co m } else if (component instanceof JCheckBoxMenuItem) { JCheckBoxMenuItem mi = (JCheckBoxMenuItem) component; if (mi.getActionCommand().equals(ACTION_VIEW_HIDDEN)) mi.setSelected(getFileChooser().isFileHidingEnabled()); } } } }