Package java.awt

Examples of java.awt.CardLayout


 
  /**
   * Layouts components in 4 panels added to this panel as cards.
   */
  private void layoutComponents() {
    this.cardLayout = new CardLayout();
    setLayout(this.cardLayout);
   
    JPanel modelPanel = new JPanel(new GridBagLayout());
    modelPanel.add(this.modelChoiceOrChangeLabel, new GridBagConstraints(
        0, 0, 2, 1, 0, 0, GridBagConstraints.LINE_START,
View Full Code Here


 
  /**
   * Layouts components in 3 panels added to this panel as cards.
   */
  private void layoutComponents() {
    this.cardLayout = new CardLayout();
    setLayout(this.cardLayout);
   
    JPanel imageChoiceTopPanel = new JPanel(new GridBagLayout());
    imageChoiceTopPanel.add(this.imageChoiceOrChangeLabel, new GridBagConstraints(
        0, 0, 1, 1, 0, 0, GridBagConstraints.LINE_START,
View Full Code Here

  private void layoutComponents() {
    int labelAlignment = OperatingSystem.isMacOSX()
        ? JLabel.TRAILING
        : JLabel.LEADING;
    // Add animatedWaitLabel and photoComponent to a card panel
    this.photoCardLayout = new CardLayout();
    this.photoPanel = new JPanel(this.photoCardLayout);
    photoPanel.add(this.photoComponent, PHOTO_CARD);
    photoPanel.add(this.animatedWaitLabel, WAIT_CARD);
    // First row
    add(photoPanel, new GridBagConstraints(
View Full Code Here

 
  /**
   * Layouts components in 3 panels added to this panel as cards.
   */
  private void layoutComponents() {
    this.cardLayout = new CardLayout();
    setLayout(this.cardLayout);
   
    JPanel imageChoiceTopPanel = new JPanel(new GridBagLayout());
    imageChoiceTopPanel.add(this.imageChoiceOrChangeLabel, new GridBagConstraints(
        0, 0, 1, 1, 0, 0, GridBagConstraints.LINE_START,
View Full Code Here

  private void layoutComponents() {
    int labelAlignment = OperatingSystem.isMacOSX()
        ? GridBagConstraints.LINE_END
        : GridBagConstraints.LINE_START;
    // Add tip and progress bar to a card panel
    this.statusLayout = new CardLayout();
    this.statusPanel = new JPanel(this.statusLayout);
    this.statusPanel.add(this.tipLabel, TIP_CARD);
    this.tipLabel.setMinimumSize(this.tipLabel.getPreferredSize());
    JPanel progressPanel = new JPanel(new BorderLayout(5, 2));
    progressPanel.add(this.progressBar, BorderLayout.NORTH);
View Full Code Here

  Map tabs = new HashMap();
  CardLayout card;

  public JCardPane() {
    card = new CardLayout();

    setLayout(card);
  }
View Full Code Here

  public void configureEditor(String propertyName, String template, String propertyBaseName, PropertyEditorManager newManager) {
    configureBasic(propertyName, template, propertyBaseName, newManager);

    editors = new ArrayList<SwingPropertyEditor>();

    layout = new CardLayout();
    this.setLayout(layout);

    // see about loading the WizardController
    String controllerClassString = manager.getProperty(template + ".controllerClass", "");
    if (controllerClassString.length() > 0) {
View Full Code Here

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

   * 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

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

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.