Package java.awt

Examples of java.awt.CardLayout


    boolean enableMe = true;
    if (selectedId == null || selectedId.equals("")) {
      enableMe = false;
    }

    CardLayout layout = (CardLayout) getLayout();

    PropertyEditorUI newSelected = idToEditorMap.get(selectedId);
    if (newSelected == null) {
      // we'll have to make a new window.
      if (selectedId == null || selectedId.equals("")) {
        JPanel jp = new JPanel();
        this.add(selectedId, jp);
      } else {
        SwingPropertyEditor spe = createEditorPane(selectedId);

        // save reference to new pane in hash table
        idToEditorMap.put(selectedId, spe);
        editors.add(spe);

        if (enableMe && isEditorEnabled()) {
          spe.removeDisableMask(this);
        } else {
          spe.addDisableMask(this);
        }
        this.add(selectedId, spe);
      }
    }
    layout.show(this, selectedId);
    currentKeyValue = selectedId;
  }
View Full Code Here


  /**
   * Creates a new PreviewContentPanel.
   */
  public PreviewContentPanel() {
    folderDisplay = new JPanel();
    folderDisplay.setLayout(new CardLayout());
    folderDisplay.add("emptyPanel", new JPanel());

    messageDisplay = new ReadMessageDisplayPanel();

    try {
View Full Code Here

    public void setRefresh(final boolean refresh) {
        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                CardLayout cl = (CardLayout) previewPanel.getLayout();
                cl.show(previewPanel, refresh ? "refreshCard" : "previewCard");
                ((JXBusyLabel) busyLabel).setBusy(refresh);
            }
        });
    }
View Full Code Here

      if(selectedObject instanceof PluginDataModel){
        PluginDataModel selectedPlug = (PluginDataModel)selectedObject;
        AbstractPlugablePanel panel = container.getPluginsMap().get(selectedPlug);
        statusPanel.setText(selectedPlug.getName());
        statusPanel.setIcon(panel.getIcon());
        CardLayout cl = (CardLayout)(plugsPanel.getLayout());
        cl.show(plugsPanel, selectedPlug.getName());    
        container.setFocusTraversalPolicy(panel.getFocusPolicy());
        container.setMainPanelPreferredSize(panel.getPreferredSize());
      }
    }
  }
View Full Code Here

    StringTokenizer st = new StringTokenizer( attr.getValue(), "(,)" );
    st.nextToken(); // skip layout type

    int[] para = Util.ia( st );
    if (para.length < 2)
      return new CardLayout();
    else
      return new CardLayout( para[ 0 ], para[ 1 ] );
  }
View Full Code Here

   * </ul>
   */
  public LayoutManager convertLayoutElement( final Element element ) {
    int hgap = Util.getInteger(element, "hgap", 0);
    int vgap = Util.getInteger(element, "vgap", 0);
    return new CardLayout(hgap, vgap);
  }
View Full Code Here

            this.id = id;

            setBackground(Color.black);
            setBorder(BorderFactory.createLineBorder(Color.white));

            setLayout(new CardLayout());

            JPanel vp = new JPanel();
            vp.setLayout(new BorderLayout());
            vp.setBackground(Color.pink);
View Full Code Here

    bus.registerPluginListener(new ReturnFocusListener() {
      public void returnFocus() {
        setup();
      }
    });
    mudListPanel = new JPanel(layouter = new CardLayout()) {
      public void update(java.awt.Graphics g) {
        paint(g);
      }
    };
View Full Code Here

        if (!cachedPanelIds.contains(id)) {
            JComponent connectionsSetupPanel = connectionBundle.createComponent();
            connectionsPanel.add(connectionsSetupPanel, id);
            cachedPanelIds.add(id);
        }
        CardLayout cardLayout = (CardLayout) connectionsPanel.getLayout();
        cardLayout.show(connectionsPanel, id);
    }
View Full Code Here

        cachedForms.clear();
        super.dispose();
    }

    private void switchSettingsPanel(ConnectionSettings connectionSettings) {
        CardLayout cardLayout = (CardLayout) connectionSetupPanel.getLayout();
        if (connectionSettings == null) {
            cardLayout.show(connectionSetupPanel, BLANK_PANEL_ID);
        } else {

            ConnectionSettingsForm currentForm = cachedForms.get(currentPanelId);
            String selectedTabName = currentForm == null ? null : currentForm.getSelectedTabName();

            currentPanelId = connectionSettings.getDatabaseSettings().getId();
            if (!cachedForms.keySet().contains(currentPanelId)) {
                JComponent setupPanel = connectionSettings.createComponent();
                this.connectionSetupPanel.add(setupPanel, currentPanelId);
                cachedForms.put(currentPanelId, connectionSettings.getSettingsEditor());
            }

            ConnectionSettingsForm settingsEditor = connectionSettings.getSettingsEditor();
            if (settingsEditor != null) {
                settingsEditor.selectTab(selectedTabName);
            }

            cardLayout.show(connectionSetupPanel, currentPanelId);
        }
    }
View Full Code Here

TOP

Related Classes of java.awt.CardLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.