Examples of CardLayout


Examples of java.awt.CardLayout

   *
   * Note that this is also the section of code which determines which
   * subproperties are to be edited.
   */
  private JPanel createEntryPanel (List itemList) {
    CardLayout entryLayout = new CardLayout();
    JPanel panel = new JPanel(entryLayout);

    for (Object o: itemList) {
      String rootProp = (String) o;
      SwingPropertyEditor sep = createEditorPane(rootProp, rootProp);

      getLogger().fine("creating editor for " + rootProp);
      // save reference to new pane in hash table
      currentPanels.put(rootProp, sep);
      editors.add(sep);

      panel.add(rootProp, sep);
    }
    String defaultProperty = manager.getProperty(property + "._default", "");

    if (defaultProperty != "")
      entryLayout.show(panel, defaultProperty);

    return panel;
  }
View Full Code Here

Examples of java.awt.CardLayout

   * Called when the selected value changed.  Should result in the
   * entryPane changing.
   */
  public void valueChanged(ListSelectionEvent e) {

    CardLayout entryLayout = (CardLayout)entryPanel.getLayout();

    String selectedId = ((SEPListEntry)((JList)e.getSource()).getSelectedValue()).getKey();

    getLogger().fine("selectedId = " + selectedId);
    if (selectedId != null) {
      SwingPropertyEditor newSelected = currentPanels.get(selectedId);
      getLogger().fine("newSelected = " + newSelected);
      entryLayout.show(entryPanel, selectedId);
    }

  }
View Full Code Here

Examples of java.awt.CardLayout

  /**
   * Returns the helpId for this editor.
   */
  public String getHelpID() {
    CardLayout entryLayout = (CardLayout)entryPanel.getLayout();
    SEPListEntry selectedValue = (SEPListEntry) optionList.getSelectedValue();
    if (selectedValue != null) {
      String selectedId = selectedValue.getKey();

      if (selectedId != null) {
View Full Code Here

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

Examples of java.awt.CardLayout

  /**
   * 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

Examples of java.awt.CardLayout

    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

Examples of java.awt.CardLayout

      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

Examples of java.awt.CardLayout

    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

Examples of java.awt.CardLayout

   * </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

Examples of java.awt.CardLayout

            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
TOP
Copyright © 2018 www.massapi.com. 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.