List of usage examples for java.awt CardLayout show
public void show(Container parent, String name)
From source file:CardLayoutDemo.java
public void actionPerformed(ActionEvent evt) { CardLayout cl = (CardLayout) (cards.getLayout()); cl.show(cards, (String) evt.getActionCommand()); }
From source file:layout.CardLayoutDemo.java
public void itemStateChanged(ItemEvent evt) { CardLayout cl = (CardLayout) (cards.getLayout()); cl.show(cards, (String) evt.getItem()); }
From source file:org.ut.biolab.medsavant.client.view.genetics.inspector.CollapsibleInspector.java
public final void switchToMessage() { CardLayout cl = (CardLayout) (container.getLayout()); cl.show(container, MESSAGEPANEL); }
From source file:org.ut.biolab.medsavant.client.view.genetics.inspector.CollapsibleInspector.java
public final void switchToPanes() { CardLayout cl = (CardLayout) (container.getLayout()); cl.show(container, PANESPANEL); }
From source file:org.ut.biolab.medsavant.client.view.app.builtin.settings.ServerLogPage.java
private synchronized void showWaitPanel() { CardLayout cl = (CardLayout) (listPanel.getLayout()); cl.show(listPanel, CARDNAME_WAIT); }
From source file:org.ut.biolab.medsavant.client.view.app.builtin.settings.ServerLogPage.java
private synchronized void hideWaitPanel() { CardLayout cl = (CardLayout) (listPanel.getLayout()); cl.show(listPanel, currentCard); }
From source file:org.ut.biolab.medsavant.client.view.app.builtin.settings.ServerLogPage.java
private synchronized void changeToCard(String cardname) { CardLayout cl = (CardLayout) (listPanel.getLayout()); cl.show(listPanel, cardname); this.currentCard = cardname; if (cardname.equals(CARDNAME_SERVER)) { if (!clientTableRefreshed) { this.refreshClientCard(); clientTableRefreshed = true; }//from ww w .j av a2s . c o m } }
From source file:correcao.PanelCorrecao.java
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: CardLayout card = (CardLayout) this.getParent().getLayout(); card.show(this.getParent(), "ProvaOff"); jButton3.setVisible(true);//from w ww . ja va 2 s .co m jLabel2.setVisible(false); p.resetStuff(); }
From source file:com.csc.GUI.ProfileGUIPanel.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./* w w w .j a v a2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new ChartPanel(createChart(createDatasetForDietaryProfile(), "Dietary")); jPanel3 = new ChartPanel(createBarChart(createDatasetForExpenseProfile())); jButton1.setText("Dietery Profile"); jButton2.setText("Expense Profile"); jPanel1.setLayout(new java.awt.CardLayout()); jButton1.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub // TODO Auto-generated method stub jPanel2 = new ChartPanel(createChart(createDatasetForDietaryProfile(), "Dietary")); jPanel1.add(jPanel2, "dietaryProfile"); CardLayout layout = (CardLayout) jPanel1.getLayout(); layout.show(jPanel1, "dietaryProfile"); } }); jButton2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub jPanel3 = new ChartPanel(createBarChart(createDatasetForExpenseProfile())); jPanel1.add(jPanel3, "expenseProfile"); CardLayout layout = (CardLayout) jPanel1.getLayout(); layout.show(jPanel1, "expenseProfile"); } }); jPanel1.add(jPanel2, "dietaryProfile"); jPanel1.add(jPanel3, "expenseProfile"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1).addComponent(jButton2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); }
From source file:org.ut.biolab.medsavant.client.view.manage.ServerLogPage.java
private synchronized void changeToCard(String cardname) { CardLayout cl = (CardLayout) (listPanel.getLayout()); cl.show(listPanel, cardname); this.currentCard = cardname; if (cardname.equals(CARDNAME_CLIENT)) { if (!clientTableRefreshed) { this.refreshClientCard(); clientTableRefreshed = true; }/*from w w w. j a va 2s .c om*/ } else if (cardname.equals(CARDNAME_SERVER)) { if (!serverTableRefreshed) { this.refreshServerCard(); serverTableRefreshed = true; } } else if (cardname.equals(CARDNAME_ANNOTATION)) { if (!annotationTableRefreshed) { this.refreshAnnotationCard(); annotationTableRefreshed = true; } } }