Java 8 CardLayout - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 CardLayout class.

This code example shows how to use the following methods:
This code example shows how to use the following methods:
  private boolean allowDataSourceCard = false;
  private boolean allowExpressionCard = false;
 
  public ElementPropertiesPanel() 
  { 
    cardLayout = new CardLayout();
    setLayout(cardLayout);
 
    this.attributeEditorPanel = new VisualAttributeEditorPanel();
    this.styleEditorPanel = new StyleEditorPanel();
    this.expressionEditorPanel = new ExpressionPropertiesEditorPanel();
    this.datasourceCarrier = new JPanel(new BorderLayout());
    final JPanel blankPanel = new JPanel();
 
    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.addTab(Messages.getString("ElementPropertiesPanel.Style"), styleEditorPanel);
    tabbedPane.addTab(Messages.getString("ElementPropertiesPanel.Attributes"), attributeEditorPanel);
 
    add(tabbedPane, ATTRIBUTES_CARD);
    add(expressionEditorPanel, EXPRESSIONS_CARD);
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
public class CardPanel extends JPanel {
    private ArrayList<ChangeListener> listeners;
    private String current;
 
    public CardPanel() { 
        super(new CardLayout());
        listeners = new ArrayList<ChangeListener>();
        current = "";
    } 
 
    public void addChangeListener(ChangeListener listener) {
        listeners.add(listener);
    } 
 
    public void addView(String name, Component comp) {
        add(comp, name);
    } 
 
    public String getView() {
        return current;
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        init(); 
    } 
 
    private void init() { 
 
        cardLayout = new CardLayout();
        contentPanel = new JPanel(cardLayout);
 
        buttonPanel = new ButtonPanel();
 
        layoutPanel(); 
    } 
 
    private void layoutPanel() { 
        FormLayout layout = new FormLayout("min, $lcgap, fill:min:g", "fill:p:g");
        CellConstraints cc = new CellConstraints();
 
        setLayout(layout);
        add(buttonPanel, cc.xy(1, 1));
        add(contentPanel, cc.xy(3, 1));
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
																	// the left 
																	// & right 
 
			imagePanel = new ImagePanel();
 
			cards = new JPanel(new CardLayout());
			cards.add("imagePanel", imagePanel);
			cards.add("dataPanel", buildDataPanel());
			add(BorderLayout.CENTER, cards);
 
			fileLabel = new Label();
			add(BorderLayout.SOUTH, fileLabel);
		} 
 
		public void setPreviewPanelType(int mode) {
			CardLayout layout = (CardLayout) cards.getLayout();
			if (mode == GeoGebraFileChooser.MODE_DATA) {
				layout.show(cards, "dataPanel");
				dataPreviewPanel.setText(app.getPlain("PreviewUnavailable"));
			} else { 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    final static String PANESPANEL = "panes";
 
    public CollapsibleInspector() { 
 
        container = ViewUtil.getClearPanel();
        container.setLayout(new CardLayout());
 
        messageContainer = ViewUtil.getClearPanel();
        messageContainer.setBorder(ViewUtil.getBigBorder());
        messageContainer.setLayout(new BorderLayout());
 
        panesContainer = new CollapsiblePanes();
        panesContainer.addExpansion();
 
        this.setLayout(new BorderLayout());
        this.add(container, BorderLayout.CENTER);
 
        container.add(panesContainer,PANESPANEL);
        container.add(messageContainer,MESSAGEPANEL);
 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
  private final JPanel loginPanel;
   
  public LauncherPanel(Launcher minecraftLauncher)
  { 
    this.minecraftLauncher = minecraftLauncher;
    this.cardLayout = new CardLayout();
    setLayout(this.cardLayout);
     
    this.progressBar = new JProgressBar();
    this.bottomBar = new BottomBarPanel(minecraftLauncher);
    this.tabPanel = new LauncherTabPanel(minecraftLauncher);
    this.loginPanel = new TexturedPanel("/dirt.png");
    createInterface(); 
  } 
   
  protected void createInterface() 
  { 
    add(createLauncherInterface(), "launcher");
    add(createDirtInterface(), "loading");
    add(createLoginInterface(), "login");
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:show
 
    public void currentDbEntityChanged(EntityDisplayEvent e) {
        if (e.getEntity() == null)
            detailLayout.show(detailPanel, EMPTY_VIEW);
        else 
            detailLayout.show(detailPanel, DB_VIEW);
    } 
 
    public void currentQueryChanged(QueryDisplayEvent e) {
        Query query = e.getQuery();
 
        if (query instanceof SelectQuery) { 
            detailLayout.show(detailPanel, SELECT_QUERY_VIEW);
        } 
        else if (query instanceof SQLTemplate) { 
            detailLayout.show(detailPanel, SQL_TEMPLATE_VIEW);
        } 
        else if (query instanceof ProcedureQuery) { 
            detailLayout.show(detailPanel, PROCEDURE_QUERY_VIEW);
        } 
3
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
            } 
        }; 
 
        /* Place an error icon. */ 
        Container main = getContentPane();
        holder_ = new JPanel( new CardLayout() );
        JLabel iconLabel = 
            new JLabel( UIManager.getIcon( "OptionPane.errorIcon" ) );
        JComponent iconPanel = new JPanel( new BorderLayout() );
        iconPanel.add( iconLabel );
        iconPanel.setBorder( gapBorder );
        main.add( iconPanel, BorderLayout.WEST );
 
        /* Create and place the component which will hold the main display. */ 
        JComponent holderBox = new JPanel( new BorderLayout() );
        holderBox.setBorder( gapBorder );
        holderBox.add( holder_, BorderLayout.CENTER );
        holderBox.add( Box.createHorizontalStrut( 256 ), BorderLayout.SOUTH );
        holderBox.add( Box.createVerticalStrut( 64 ), BorderLayout.WEST );
        main.add( holderBox, BorderLayout.CENTER );
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:next
        switchButtons(); 
    } 
 
    private void switchButtons() { 
        CardLayout buttonLyt = (CardLayout) buttonPanel.getLayout();
        buttonLyt.next(buttonPanel);
    } 
 
    private void refreshUI() { 
        mainLabel.setText(msgGenerator.getChallengeMessage());
        messageLabel.setText(msgGenerator.getResultMessage());
        guessText.setText("");
        guessesLeftBar.setValue(game.getRemainingGuesses());
        guessText.requestFocus();
    } 
 
    // swing components 
    private javax.swing.JPanel borderPanel;
    private javax.swing.JPanel buttonPanel;
    private javax.swing.JPanel gamePanel;
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Java 8 CardLayout Methods: