Java 类java.awt.CardLayout 实例源码

项目:incubator-netbeans    文件:ResultViewPanel.java   
public ResultViewPanel(SearchTask searchTask) {
    setLayout(resultViewCards = new CardLayout());
    this.searchComposition = searchTask.getComposition();
    this.searchTask = searchTask;
    SearchResultsDisplayer<?> displayer =
            searchComposition.getSearchResultsDisplayer();
    setName(displayer.getTitle());
    displayer.setInfoNode(this.createListener().getInfoNode());
    resultsPanel = new JPanel();
    resultsPanel.setLayout(
            new BoxLayout(resultsPanel, BoxLayout.PAGE_AXIS));
    SearchResultsDisplayer<?> disp =
            searchComposition.getSearchResultsDisplayer();
    visualComponent = disp.getVisualComponent();
    lookup = (visualComponent instanceof Lookup.Provider)
            ? ((Lookup.Provider) visualComponent).getLookup()
            : Lookup.EMPTY;
    resultsPanel.add(visualComponent);
    add(resultsPanel, CARD_NAME_RESULTS);
    showInfo(UiUtils.getText("TEXT_WAITING_FOR_PREVIOUS"));         //NOI18N
}
项目:incubator-netbeans    文件:DefaultProjectRenamePanel.java   
/**
 * Creates new form DefaultProjectRenamePanel
 */
public DefaultProjectRenamePanel(ProgressHandle handle, Project project, String name) {
    this.project = project;
    this.handle = handle;

    if (name == null) {
        name = ProjectUtils.getInformation(project).getDisplayName();
    }

    initComponents();

    projectName.setText(name);
    projectName.getDocument().addDocumentListener(this);
    updateProjectFolder();
    validateDialog();

    if (Boolean.getBoolean("org.netbeans.modules.project.uiapi.DefaultProjectOperations.showProgress")) {
        ((CardLayout) progress.getLayout()).show(progress, "progress");
    }
}
项目:incubator-netbeans    文件:ProjectCopyPanel.java   
/**
 * Creates new form ProjectCopyPanel
 */
public ProjectCopyPanel(ProgressHandle handle, Project project, boolean isMove) {
    this.project = project;
    this.isMove = isMove;
    this.handle = handle;


    initComponents();
    setProject();
    projectName.getDocument().addDocumentListener(this);
    projectLocation.getDocument().addDocumentListener(this);

    if (isMove) {
        nameLabel.setVisible(false);
        projectName.setVisible(false);
        warningTextArea.setVisible(false);
    }

    if (Boolean.getBoolean("org.netbeans.modules.project.uiapi.DefaultProjectOperations.showProgress")) {
        ((CardLayout) progress.getLayout()).show(progress, "progress");
    }
}
项目:jdk8u-jdk    文件:java_awt_CardLayout.java   
@Override
protected void validate(CardLayout before, CardLayout after) {
    super.validate(before, after);
    try {
        Vector a = (Vector) VECTOR.get(after);
        Vector b = (Vector) VECTOR.get(before);
        int size = a.size();
        if (size != b.size()) {
            throw new Error("different content");
        }
        for (int i = 0; i < size; i++) {
            super.validator.validate(NAME.get(a.get(i)), NAME.get(b.get(i)));
            super.validator.validate(COMP.get(a.get(i)), COMP.get(b.get(i)));
        }
    }
    catch (Exception exception) {
        throw new Error(exception);
    }
}
项目:incubator-netbeans    文件:ConfirmationPanel.java   
@Messages({
    "LBL_FormattingQuestion=Recursively format the selected files and folders?",
    "LBL_FormattingInProgress=Formatting:"
})
public ConfirmationPanel(ProgressHandle handle) {
    initComponents();
    setLayout(new CardLayout());
    add(new JLabel(Bundle.LBL_FormattingQuestion()), PANEL_QUESTION);
    JPanel progress = new JPanel(new BorderLayout());
    JLabel inProgressLabel = new JLabel(Bundle.LBL_FormattingInProgress());
    inProgressLabel.setBorder(new EmptyBorder(0, 0, 6, 0));
    progress.add(inProgressLabel, BorderLayout.NORTH);
    progress.add(ProgressHandleFactory.createProgressComponent(handle), BorderLayout.CENTER);
    add(progress, PANEL_PROGRESS);
    ((CardLayout) getLayout()).show(this, PANEL_QUESTION);
}
项目:incubator-netbeans    文件:LiveFlatProfilePanel.java   
private void initComponents() {
    setLayout(new BorderLayout());

    noResultsPanel = new JPanel();
    noResultsPanel.setLayout(new BorderLayout());
    noResultsPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));

    final JLabel noResultsLabel = new JLabel(NO_RESULTS_STRING);

    noResultsLabel.setFont(noResultsLabel.getFont().deriveFont(14));
    noResultsLabel.setEnabled(false);
    noResultsPanel.add(noResultsLabel, BorderLayout.NORTH);

    resultsTable = new JPanel(new CardLayout());
    resultsTable.add(noResultsLabel, "NORESULTS"); // NOI18N

    add(resultsTable, BorderLayout.CENTER);
}
项目:incubator-netbeans    文件:WebBrowsersOptionsPanel.java   
public void valueChanged(ListSelectionEvent evt) {
    if (evt.getValueIsAdjusting() == false && browsersModel.isAdjusting() == false) {
        int index = browsersList.getSelectedIndex();
        String panelID = browsersModel.getPropertyPanelID(index);
        ((CardLayout) customPropertyPanel.getLayout()).show(customPropertyPanel, panelID);
        nameTextField.setText(browsersModel.getBrowserName(index));
        if (browsersModel.isDefaultBrowser(index)) {
            // if any of default browsers is selected then browser name won't be editable and remove button disabled
            nameTextField.setEditable(false);
            removeButton.setEnabled(false);
        } else {
            nameTextField.setEditable(true);
            removeButton.setEnabled(true);
        }
        browsersModel.setSelectedValue(browsersList.getSelectedValue());
    }
}
项目:openjdk-jdk10    文件:CardTest.java   
@Override
public void actionPerformed(ActionEvent e) {
    String arg = e.getActionCommand();

    if ("first".equals(arg)) {
        ((CardLayout) cards.getLayout()).first(cards);
    } else if ("next".equals(arg)) {
        ((CardLayout) cards.getLayout()).next(cards);
    } else if ("previous".equals(arg)) {
        ((CardLayout) cards.getLayout()).previous(cards);
    } else if ("last".equals(arg)) {
        ((CardLayout) cards.getLayout()).last(cards);
    } else {
        ((CardLayout) cards.getLayout()).show(cards, arg);
    }
}
项目:incubator-netbeans    文件:ResourceWizardPanel.java   
/** Gets component to display. Implements superclass abstract method. 
 * @return this instance */
protected Component createComponent() {
    JPanel panel = new JPanel(new CardLayout());

    // Accessibility
    panel.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(ResourceWizardPanel.class).getString("ACS_ResourceWizardPanel"));                 

    panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(1));

    String msgKey = testWizard ? "TXT_SelectTestResource"       //NOI18N
                               : "TXT_SelectResource";          //NOI18N
    panel.setName(NbBundle.getMessage(ResourceWizardPanel.class, msgKey));
    panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);

    panel.add(getUI(), CARD_GUI);

    return panel;
}
项目:incubator-netbeans    文件:HardStringWizardPanel.java   
/** Reads settings at the start when the panel comes to play. Overrides superclass method. */
   @Override
   public void readSettings(I18nWizardDescriptor.Settings settings) {
super.readSettings(settings);
       getUI().setSourceMap(getMap());

       hasFoundStrings = foundStrings(getMap());

       JPanel panel = (JPanel)getComponent();
       if (hasFoundStrings) {
           panel.add(getUI(), CARD_GUI);
           ((CardLayout) panel.getLayout()).show(panel, CARD_GUI);
       } else {
           panel.add(getMessageComp(), CARD_MSG);
           ((CardLayout) panel.getLayout()).show(panel, CARD_MSG);
       }
   }
项目:incubator-netbeans    文件:TestStringWizardPanel.java   
/** Gets component to display. Implements superclass abstract method. 
 * @return this instance */
protected Component createComponent() {
    JPanel panel = new JPanel(new CardLayout());
    panel.getAccessibleContext().setAccessibleDescription(
            NbBundle.getMessage(
                    TestStringWizardPanel.class,
                    "ACS_TestStringWizardPanel"));              //NOI18N

    panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX,
                            Integer.valueOf(2));
    panel.setName(
            NbBundle.getMessage(TestStringWizardPanel.class,
                                "TXT_FoundMissingResource"));   //NOI18N
    panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);                    
    return panel;
}
项目:jdk8u-jdk    文件:CardTest.java   
@Override
public void actionPerformed(ActionEvent e) {
    String arg = e.getActionCommand();

    if ("first".equals(arg)) {
        ((CardLayout) cards.getLayout()).first(cards);
    } else if ("next".equals(arg)) {
        ((CardLayout) cards.getLayout()).next(cards);
    } else if ("previous".equals(arg)) {
        ((CardLayout) cards.getLayout()).previous(cards);
    } else if ("last".equals(arg)) {
        ((CardLayout) cards.getLayout()).last(cards);
    } else {
        ((CardLayout) cards.getLayout()).show(cards, arg);
    }
}
项目:rapidminer    文件:GroupingConfigurationPanel.java   
@Override
protected void adaptGUI() {
    DimensionConfig dimensionConfig = getPlotConfiguration().getDimensionConfig(dimension);
    if (dimensionConfig != null) {
        CardLayout cl = (CardLayout) this.getLayout();
        GroupingType groupingType = null;

        ValueGrouping grouping = dimensionConfig.getGrouping();
        if (grouping != null) {
            groupingType = grouping.getGroupingType();
        } else {
            groupingType = GroupingType.NONE;
        }
        cl.show(this, groupingType.toString());
    }
}
项目:rapidminer    文件:OpenProcessCard.java   
private JComponent createBackButton() {
    JButton backButton = new JButton(new ResourceAction("getting_started.back", new Object[0]) {
        private static final long serialVersionUID = 1L;

        public void actionPerformed(ActionEvent e) {
            CardLayout layout = (CardLayout)OpenProcessCard.this.getLayout();
            layout.show(OpenProcessCard.this, "overview");
            OpenProcessCard.this.isOverviewShown = true;
            if(OpenProcessCard.this.entryList.getModel().getSize() > 0) {
                OpenProcessCard.this.entryList.setSelectedIndex(0);
            }

            OpenProcessCard.this.entryList.requestFocusInWindow();
        }
    });
    backButton.setFocusable(false);
    this.styleButton(backButton);
    return backButton;
}
项目:openjdk-jdk10    文件:java_awt_CardLayout.java   
@Override
protected void validate(CardLayout before, CardLayout after) {
    super.validate(before, after);
    try {
        Vector a = (Vector) VECTOR.get(after);
        Vector b = (Vector) VECTOR.get(before);
        int size = a.size();
        if (size != b.size()) {
            throw new Error("different content");
        }
        for (int i = 0; i < size; i++) {
            super.validator.validate(NAME.get(a.get(i)), NAME.get(b.get(i)));
            super.validator.validate(COMP.get(a.get(i)), COMP.get(b.get(i)));
        }
    }
    catch (Exception exception) {
        throw new Error(exception);
    }
}
项目:VASSAL-src    文件:MultiImagePicker.java   
public void swap(int index1, int index2) {
  Component[] components = new Component[imageListElements.size()];
  for (int i = 0; i < imageListElements.size(); i++) {
    components[i] = multiPanel.getComponent(i);
  }
  multiPanel.removeAll();
  cl = new CardLayout();
  multiPanel.setLayout(cl);

  for (int i = 0; i < imageListElements.size(); i++) {
    Component c = null;
    if (i == index1) {
      c = components[index2];
    }
    else if (i == index2) {
      c = components[index1];
    }
    else {
      c = components[i];
    }
    multiPanel.add(c, "Image " + (i+1));
  }

  imageList.setSelectedIndex(index2);
  showSelected();
}
项目:GIFKR    文件:ChannelSettingsPanel.java   
public void initializeComponents() {
    channelBox = new JCheckBox("Filter by channel", false);

    allSets = new SettingsPanel(r);
    rSets = new SettingsPanel(r);
    gSets = new SettingsPanel(r);
    bSets = new SettingsPanel(r);

    channelPane = new JTabbedPane();
    channelPane.add("Red", rSets);
    channelPane.add("Green", gSets);
    channelPane.addTab("Blue", bSets);

    cardPanel = new JPanel(new CardLayout());
    cardPanel.add(allSets, "all");
    cardPanel.add(channelPane, "rgb");
}
项目:defense-solutions-proofs-of-concept    文件:MainMenuJPanel.java   
private void showCard(String cardName) {
    //Special handling for certain cards
    if ("Overlays Card".equals(cardName)) {
        refreshTOC();
    }

    CardLayout layout = (CardLayout) (getLayout());
    layout.show(this, cardName);
}
项目:JavaGraph    文件:SettingsPanel.java   
/** Sets the syntax help for a given combination of exploration key and setting kind. */
public void setHelp(ExploreKey key, SettingKey kind) {
    String name = getName(key, kind);
    if (this.knownHelp.add(name)) {
        JComponent help = this.helpFactory.createHelp(key, kind);
        JScrollPane scrollPane = new JScrollPane(help);
        getHelpPanel().add(scrollPane, name);
    }
    CardLayout cl = (CardLayout) getHelpPanel().getLayout();
    cl.show(getHelpPanel(), name);
}
项目:JavaGraph    文件:SettingsPanel.java   
private JPanel computeHelpPanel() {
    JPanel result = new JPanel(new CardLayout());
    // add a dummy panel to ensure first help screen really shows up
    result.add(new JPanel(), "dummy");
    result.setBorder(new CompoundBorder(getDialog().createEmptyBorder(),
        BorderFactory.createTitledBorder("Help")));
    result.setPreferredSize(new Dimension(200, 100));
    return result;
}
项目:incubator-netbeans    文件:CardLayoutBeanInfo.java   
@Override
protected PropertyDescriptor[] createPropertyDescriptors() throws IntrospectionException {
    PropertyDescriptor[] pds = new PropertyDescriptor[] {
        createRW(CardLayout.class, "hgap"), // NOI18N
        createRW(CardLayout.class, "vgap"), // NOI18N
    };
    return pds;
}
项目:incubator-netbeans    文件:FoldOptionsPanel.java   
private void languageSelected() {
    String[] sel = (String[])langSelect.getSelectedItem();
    if (sel == null) {
        return;
    }
    String mime = sel[0];
    if (currentPreferences != null) {
        currentPreferences.removePreferenceChangeListener(wPrefL);
    }
    currentPreferences = ctrl.prefs(mime);
    JComponent panel = panels.get(mime);
    String parentMime = MimePath.parse(mime).getInheritedType();
    if (parentMime != null) {
        parentPrefs = ctrl.prefs(parentMime);
    } else {
        parentPrefs = null;
    }
    if (panel == null) {
        panel = new DefaultFoldingOptions(mime, currentPreferences);
        if (panel instanceof CustomizerWithDefaults) {
                ((CustomizerWithDefaults)panel).setDefaultPreferences(parentPrefs);
        }
        panels.put(mime, panel);
        content.add(panel, mime);
    }
    ((CardLayout)content.getLayout()).show(content, mime);
    currentPreferences.addPreferenceChangeListener(wPrefL);
    useDefaults.setVisible(!"".equals(mime)); // NOI18N
    preferenceChange(null);
}
项目:incubator-netbeans    文件:DefaultProjectRenamePanel.java   
public void showProgress() {
    projectFolder.setEnabled(false);
    projectName.setEnabled(false);
    alsoRenameFolder.setEnabled(false);
    progress.setVisible(true);

    ((CardLayout) progress.getLayout()).last(progress);
}
项目:incubator-netbeans    文件:ProjectCopyPanel.java   
public void showProgress() {
    projectFolder.setEnabled(false);
    projectLocation.setEnabled(false);
    projectName.setEnabled(false);
    browse.setEnabled(false);

    ((CardLayout) progress.getLayout()).show(progress, "progress");
}
项目:incubator-netbeans    文件:DiffToRevision.java   
@Override
public void actionPerformed (ActionEvent e) {
    if (e.getSource() == panel.cmbDiffKind) {
        DiffToRevisionKind rebaseKind = (DiffToRevisionKind) panel.cmbDiffKind.getSelectedItem();
        panel.lblDescription.setText(rebaseKind.getDescription());
        ((CardLayout) panel.panelDiffKind.getLayout()).show(panel.panelDiffKind, rebaseKind.getId());
        okButton.setEnabled(rebaseKind.isValid());
    }
}
项目:incubator-netbeans    文件:Rebase.java   
@Override
public void actionPerformed (ActionEvent e) {
    if (e.getSource() == panel.cmbRebaseType) {
        RebaseKind rebaseKind = (RebaseKind) panel.cmbRebaseType.getSelectedItem();
        panel.lblDescription.setText(rebaseKind.getDescription());
        ((CardLayout) panel.panelKind.getLayout()).show(panel.panelKind, rebaseKind.getId());
        okButton.setEnabled(rebaseKind.isValid());
    }
}
项目:Fodder-OOM_Project    文件:LoginPage.java   
private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseClicked
    // TODO add your handling code here:
    CardLayout c1 = (CardLayout) jPanel7.getLayout();
    c1.show(jPanel7, "registerLabel");
    CardLayout c2 = (CardLayout) jPanel4.getLayout();
    c2.show(jPanel4, "loginCard");
}
项目:jdk8u-jdk    文件:MenuBarSetFont.java   
public static void main(final String[] args) throws Exception {

        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
            System.err.println("This test is not for OS X. Menu.setFont() is not supported on OS X.");
            return;
        }

        //Components initialization.
        frame.setMenuBar(mb);
        mb.setFont(new Font("Helvetica", Font.ITALIC, 5));

        final Button button = new Button("Click Me");
        button.addActionListener(new Listener());
        frame.setLayout(new CardLayout());
        frame.add(button, "First");
        frame.setSize(400, 400);
        frame.setVisible(true);
        sleep();

        final int fInsets = frame.getInsets().top;  //Frame insets without menu.
        addMenu();
        final int fMenuInsets = frame.getInsets().top; //Frame insets with menu.
        final int menuBarHeight = fMenuInsets - fInsets;
        // There is no way to change menubar height on windows. But on windows
        // we can try to split menubar in 2 rows.
        for (int i = 0; i < 100 && fMenuInsets == frame.getInsets().top; ++i) {
            // Fill whole menubar.
            addMenu();
        }

        mb.remove(0);
        frame.validate();
        sleep();

        // Test execution.
        // On XToolkit, menubar font should be changed to 60.
        // On WToolkit, menubar font should be changed to default and menubar
        // should be splitted in 2 rows.
        mb.setFont(new Font("Helvetica", Font.ITALIC, 60));
        sleep();

        final Robot r = new Robot();
        r.setAutoDelay(200);
        final Point pt = frame.getLocation();
        r.mouseMove(pt.x + frame.getWidth() / 2,
                    pt.y + fMenuInsets + menuBarHeight / 2);
        r.mousePress(InputEvent.BUTTON1_MASK);
        r.mouseRelease(InputEvent.BUTTON1_MASK);

        sleep();
        frame.dispose();

        if (clicked) {
            fail("Font was not changed");
        }
    }
项目:jdk8u-jdk    文件:java_awt_CardLayout.java   
@Override
protected CardLayout getObject() {
    CardLayout layout = new CardLayout();
    layout.addLayoutComponent(new JLabel("a"), "a");
    layout.addLayoutComponent(new JLabel("b"), "b");
    layout.addLayoutComponent(new JLabel("c"), "c");
    return layout;
}
项目:jdk8u-jdk    文件:CardTest.java   
CardPanel(ActionListener actionListener) {
    listener = actionListener;
    setLayout(new CardLayout());
    add("one", create(new FlowLayout()));
    add("two", create(new BorderLayout()));
    add("three", create(new GridLayout(2, 2)));
    add("four", create(new BorderLayout(10, 10)));
    add("five", create(new FlowLayout(FlowLayout.LEFT, 10, 10)));
    add("six", create(new GridLayout(2, 2, 10, 10)));
}
项目:incubator-netbeans    文件:InitPanel.java   
public void finished() {
    //initComponent.setBackground((Color) javax.swing.UIManager.getDefaults().get("Tree.background"));    // NOI18N
    add(oPanel, "ready");   // NOI18N                
    CardLayout card = (CardLayout) getLayout();
    card.show(this, "ready"); // NOI18N            
    oPanel.requestFocus(); // #44487
}
项目:incubator-netbeans    文件:TreeEntityDeclCustomizer.java   
/**
 */
protected final void updateTypeComponent () {
    CardLayout cl = (CardLayout)typeCardPanel.getLayout ();
    if ( getEntityDecl ().getType () == TreeEntityDecl.TYPE_INTERNAL ) {
        internalRadio.setSelected (true);
        cl.show (typeCardPanel, "internalPanel"); // NOI18N
    } else if ( getEntityDecl ().getType () == TreeEntityDecl.TYPE_EXTERNAL ) {
        externalRadio.setSelected (true);
        cl.show (typeCardPanel, "externalPanel"); // NOI18N
    } else {
        unparsedRadio.setSelected (true);
        cl.show (typeCardPanel, "unparsedPanel"); // NOI18N
    }
}
项目:incubator-netbeans    文件:ResourceWizardPanel.java   
/** Reads settings at the start when the panel comes to play. Overrides superclass method. */
   @Override
   public void readSettings(I18nWizardDescriptor.Settings settings) {
super.readSettings(settings);
       getUI().setSourceMap(getMap());

       Container container = (Container) getComponent();
       ((CardLayout) container.getLayout()).show(container, CARD_GUI);
   }
项目:incubator-netbeans    文件:HardStringWizardPanel.java   
/** Gets component to display. Implements superclass abstract method. 
 * @return this instance */
protected Component createComponent() {
    JPanel panel = new JPanel(new CardLayout());

    panel.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(HardStringWizardPanel.class).getString("ACS_HardStringWizardPanel"));//NOI18N

    panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(3));
    panel.setName(NbBundle.getBundle(HardStringWizardPanel.class).getString("TXT_ModifyStrings"));//NOI18N
    panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);        

    return panel;
}
项目:incubator-netbeans    文件:RepositorySelectorBuilder.java   
private void displayEmptyPanel() {
    if (!emptyPanelInitialized) {
        cardsPanel.add(new JPanel(), EMPTY_PANEL);
        emptyPanelInitialized = true;
    }
    ((CardLayout) cardsPanel.getLayout()).show(cardsPanel, EMPTY_PANEL);

    if (repositoryFormVisible) {
        repositoryFormsPanel.removeChangeListener(repositoryFormPanelListener);
        repositoryFormVisible = false;
    }
    setDataValid(true);
}
项目:JavaGraph    文件:ResourceDisplay.java   
@Override
protected JComponent createInfoPanel() {
    JPanel result = new JPanel();
    result.setLayout(new CardLayout());
    result.add(getSingleInfoPanel(), this.SINGLE_INFO_KEY);
    result.add(getSplitInfoPanel(), this.SPLIT_INFO_KEY);
    result.setBorder(null);
    return result;
}
项目:JavaGraph    文件:ButtonEditor.java   
/**
 * Returns the panel holding the content editors.
 */
private JPanel getContentPanel() {
    if (this.contentPanel == null) {
        this.contentPanel = new JPanel(new CardLayout());
    }
    return this.contentPanel;
}
项目:rapidminer    文件:AbstractToRepositoryStep.java   
/**
 * Shows the card specified by id, e.g. {@link #CARD_ID_CHOOSER} or {@link #CARD_ID_PROGRESS}.
 *
 * @param cardId
 *            the id of the card
 */
private void showCard(final String cardId) {
    SwingTools.invokeLater(new Runnable() {

        @Override
        public void run() {
            ((CardLayout) mainPanel.getLayout()).show(mainPanel, cardId);
        }
    });
}
项目:apcs_final    文件:AdBlockerFrame.java   
public AdBlockerFrame()
{
    super();
    setSystemLookAndFeel();
    setTitle(title);
    resized();

    cardLayout = new CardLayout();
    getContentPane().setLayout(cardLayout);

    ClosableWindow cw = new ClosableWindow(this);
    addWindowListener(cw);

    ResizableComponent rs = new ResizableComponent(this);
    addComponentListener(rs);

    System.out.println("Opening Window");
    menuPanel = new MenuPanel(title, subtitle, width, height, this);
    helpPanel = new HelpPanel(title, subtitle, width, height, this);
    newGamePanel = new NewGamePanel(title, subtitle, width, height, this);
    add(menuPanel, "menuPanel");
    add(helpPanel, "helpPanel");
    add(newGamePanel, "newGamePanel");

    playBackgroundMusic();

    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);
    setUndecorated(true);
    setVisible(true);
}
项目:rapidminer    文件:LoadingContentPane.java   
/**
 * Tells the LoadingContentPane that the content has finished loading, switches to the actual
 * content pane.
 **/
public void loadingFinished() {
    if (loading) {
        ((CardLayout) (getLayout())).last(LoadingContentPane.this);
        loading = false;
    }
}