Search in sources :

Example 1 with RosterGroupSelector

use of jmri.jmrit.roster.rostergroup.RosterGroupSelector in project JMRI by JMRI.

the class RosterFrameAction method actionPerformed.

@Override
public void actionPerformed(ActionEvent event) {
    mainFrame = new RosterFrame();
    UserPreferencesManager p = InstanceManager.getDefault(jmri.UserPreferencesManager.class);
    if (!p.isWindowPositionSaved(mainFrame.getWindowFrameRef())) {
        mainFrame.setSize(new Dimension(1024, 600));
        mainFrame.setPreferredSize(new Dimension(1024, 600));
    }
    if (wi instanceof RosterGroupSelector) {
        mainFrame.setSelectedRosterGroup(((RosterGroupSelector) wi).getSelectedRosterGroup());
    }
    mainFrame.setVisible(true);
    mainFrame.setAllowQuit(allowQuit);
    mainFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
}
Also used : Dimension(java.awt.Dimension) UserPreferencesManager(jmri.UserPreferencesManager) RosterGroupSelector(jmri.jmrit.roster.rostergroup.RosterGroupSelector)

Example 2 with RosterGroupSelector

use of jmri.jmrit.roster.rostergroup.RosterGroupSelector in project JMRI by JMRI.

the class DecoderPro3Action method actionPerformed.

@Override
public void actionPerformed(ActionEvent event) {
    mainFrame = new DecoderPro3Window(DecoderPro3.getMenuFile(), DecoderPro3.getToolbarFile());
    UserPreferencesManager p = InstanceManager.getDefault(jmri.UserPreferencesManager.class);
    if (!p.isWindowPositionSaved(mainFrame.getWindowFrameRef())) {
        mainFrame.setSize(new Dimension(1024, 600));
        mainFrame.setPreferredSize(new Dimension(1024, 600));
    }
    if (wi instanceof RosterGroupSelector) {
        mainFrame.setSelectedRosterGroup(((RosterGroupSelector) wi).getSelectedRosterGroup());
    }
    mainFrame.setVisible(true);
    mainFrame.setAllowQuit(allowQuit);
    mainFrame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
}
Also used : Dimension(java.awt.Dimension) UserPreferencesManager(jmri.UserPreferencesManager) RosterGroupSelector(jmri.jmrit.roster.rostergroup.RosterGroupSelector)

Aggregations

Dimension (java.awt.Dimension)2 UserPreferencesManager (jmri.UserPreferencesManager)2 RosterGroupSelector (jmri.jmrit.roster.rostergroup.RosterGroupSelector)2