當前位置: 首頁>>代碼示例>>Java>>正文


Java CardLayout.show方法代碼示例

本文整理匯總了Java中java.awt.CardLayout.show方法的典型用法代碼示例。如果您正苦於以下問題:Java CardLayout.show方法的具體用法?Java CardLayout.show怎麽用?Java CardLayout.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.awt.CardLayout的用法示例。


在下文中一共展示了CardLayout.show方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initComponents

import java.awt.CardLayout; //導入方法依賴的package包/類
protected void initComponents() {        
    if (!oPanel.isPrepared()) {
        initComponent = new JLabel(NbBundle.getMessage(InitPanel.class, "LBL_computing")); // NOI18N
        initComponent.setPreferredSize(new Dimension(850, 450));
        // avoid flicking ?
        Color c = UIManager.getColor("Tree.background"); // NOI18N
        if (c == null) {
            //GTK 1.4.2 will return null for Tree.background
            c = Color.WHITE;
        }
        initComponent.setBackground(c);    // NOI18N               
        initComponent.setHorizontalAlignment(SwingConstants.CENTER);
        initComponent.setOpaque(true);
        
        CardLayout card = new CardLayout();
        setLayout(card);            
        add(initComponent, "init");    // NOI18N
        card.show(this, "init"); // NOI18N        
        Utilities.attachInitJob(this, this);
    } else {
        finished();  
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:24,代碼來源:InitPanel.java

示例2: adaptGUI

import java.awt.CardLayout; //導入方法依賴的package包/類
@Override
protected void adaptGUI() {
	DimensionConfig dimensionConfig = getPlotConfiguration().getDimensionConfig(dimension);
	if (dimensionConfig != null) {
		CardLayout cl = (CardLayout) this.getLayout();
		GroupingType groupingType = null;

		ValueGrouping grouping = dimensionConfig.getGrouping();
		if (grouping != null) {
			groupingType = grouping.getGroupingType();
		} else {
			groupingType = GroupingType.NONE;
		}
		cl.show(this, groupingType.toString());
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:17,代碼來源:GroupingConfigurationPanel.java

示例3: createBackButton

import java.awt.CardLayout; //導入方法依賴的package包/類
private JComponent createBackButton() {
    JButton backButton = new JButton(new ResourceAction("getting_started.back", new Object[0]) {
        private static final long serialVersionUID = 1L;

        public void actionPerformed(ActionEvent e) {
            CardLayout layout = (CardLayout)OpenProcessCard.this.getLayout();
            layout.show(OpenProcessCard.this, "overview");
            OpenProcessCard.this.isOverviewShown = true;
            if(OpenProcessCard.this.entryList.getModel().getSize() > 0) {
                OpenProcessCard.this.entryList.setSelectedIndex(0);
            }

            OpenProcessCard.this.entryList.requestFocusInWindow();
        }
    });
    backButton.setFocusable(false);
    this.styleButton(backButton);
    return backButton;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:20,代碼來源:OpenProcessCard.java

示例4: YoutubeGrabberDlg

import java.awt.CardLayout; //導入方法依賴的package包/類
public YoutubeGrabberDlg(DownloadStateListner mg) {
	super();
	this.dl = mg;
	setSize(420, 350);
	JLabel titleLbl = new JLabel(StringResource.getString("YT_LBL3"));
	titleLbl.setForeground(Color.WHITE);
	titleLbl.setFont(StaticResource.plainFontBig2);
	titleLbl.setBorder(new EmptyBorder(10, 10, 10, 10));
	getTitlePanel().add(titleLbl);
	createP1();
	createP2();
	createP3();
	card = new CardLayout();
	p = new JPanel(card);
	p.add(p1, "1");
	p.add(p2, "2");
	p.add(p3, "3");
	add(p);
	try {
		setIconImage(XDMIconMap.getIcon("APP_ICON").getImage());
	} catch (Exception e) {
	}
	card.show(p, "1");
}
 
開發者ID:kmarius,項目名稱:xdman,代碼行數:25,代碼來源:YoutubeGrabberDlg.java

示例5: WizardDialog

import java.awt.CardLayout; //導入方法依賴的package包/類
@SuppressWarnings("LeakingThisInConstructor")
WizardDialog(JFrame frame, boolean modal) {
    super(frame, "Embedded JFileChooser Demo", modal);

    cardLayout = new CardLayout();
    cardPanel = new JPanel(cardLayout);
    getContentPane().add(cardPanel, BorderLayout.CENTER);

    messageLabel = new JLabel("", JLabel.CENTER);
    cardPanel.add(chooser, "fileChooser");
    cardPanel.add(messageLabel, "label");
    cardLayout.show(cardPanel, "fileChooser");
    chooser.addActionListener(this);

    JPanel buttonPanel = new JPanel();
    backButton = new JButton("< Back");
    nextButton = new JButton("Next >");
    closeButton = new JButton("Close");

    buttonPanel.add(backButton);
    buttonPanel.add(nextButton);
    buttonPanel.add(closeButton);

    getContentPane().add(buttonPanel, BorderLayout.SOUTH);

    backButton.setEnabled(false);
    getRootPane().setDefaultButton(nextButton);

    backButton.addActionListener(this);
    nextButton.addActionListener(this);
    closeButton.addActionListener(this);

    pack();
    setLocationRelativeTo(frame);
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:36,代碼來源:FileChooserDemo.java

示例6: finished

import java.awt.CardLayout; //導入方法依賴的package包/類
public void finished() {
    //initComponent.setBackground((Color) javax.swing.UIManager.getDefaults().get("Tree.background"));    // NOI18N
    add(oPanel, "ready");   // NOI18N                
    CardLayout card = (CardLayout) getLayout();
    card.show(this, "ready"); // NOI18N            
    oPanel.requestFocus(); // #44487
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:InitPanel.java

示例7: itemStateChanged

import java.awt.CardLayout; //導入方法依賴的package包/類
@Override
public void itemStateChanged(ItemEvent ie) {
    if (ie.getStateChange() == ItemEvent.SELECTED) {
        CardLayout layout = (CardLayout) repos.getLayout();
        layout.show(repos, ((JToggleButton) ie.getSource()).getActionCommand());
    }
}
 
開發者ID:CognizantQAHub,項目名稱:Cognizant-Intelligent-Test-Scripter,代碼行數:8,代碼來源:ObjectRepo.java

示例8: jLabel3MouseClicked

import java.awt.CardLayout; //導入方法依賴的package包/類
private void jLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel3MouseClicked
    // TODO add your handling code here:
    CardLayout c1 = (CardLayout) jPanel7.getLayout();
    c1.show(jPanel7, "registerLabel");
    CardLayout c2 = (CardLayout) jPanel4.getLayout();
    c2.show(jPanel4, "loginCard");
}
 
開發者ID:himank-goel,項目名稱:Fodder-OOM_Project,代碼行數:8,代碼來源:LoginPage.java

示例9: setCurrentValue

import java.awt.CardLayout; //導入方法依賴的package包/類
@Override
public void setCurrentValue(Serialized value) {
    String keyword = value.getKeyword();
    if (this.templateKeywords.contains(keyword)) {
        this.nameSelector.setSelectedIndex(this.templateKeywords.indexOf(keyword));
        EncodedTypeEditor<?,Serialized> editor = this.editors.get(keyword);
        editor.setCurrentValue(value);
        int editorHeight = editor.getMinimumSize().height;
        this.infoPanel.setPreferredSize(new Dimension(0, editorHeight));
        CardLayout cards = (CardLayout) (this.infoPanel.getLayout());
        cards.show(this.infoPanel, value.getKeyword());
    }
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:14,代碼來源:TemplateList.java

示例10: preencherCaixas

import java.awt.CardLayout; //導入方法依賴的package包/類
public void preencherCaixas() {
    CardLayout cardCadastrar = (CardLayout) Root.getLayout();
    cardCadastrar.show(Root, "JpCadastrar");
    jbIncluir.setVisible(false);
    jbSalvar.setVisible(true);

    Produto p = produtoEmAlteracao;

    JtxtNome.setText(p.getNome());
    jADescricao.setText(p.getDescricao());
    jtxtCategoria.setText(p.getCategoria());
    jtxtCompra.setText(p.getValorCompra().toString());
    jtxtVenda.setText(p.getValorVenda().toString());
}
 
開發者ID:OgumaJr,項目名稱:Entrega-Final,代碼行數:15,代碼來源:Principal.java

示例11: fluorophoreComboBoxItemStateChanged

import java.awt.CardLayout; //導入方法依賴的package包/類
private void fluorophoreComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_fluorophoreComboBoxItemStateChanged
    CardLayout cl = (CardLayout)(fluorophoreCardPanel.getLayout());
    cl.show(fluorophoreCardPanel, (String)evt.getItem());
}
 
開發者ID:LEB-EPFL,項目名稱:SASS,代碼行數:5,代碼來源:InitializeSimulation.java

示例12: JbCadastarActionPerformed

import java.awt.CardLayout; //導入方法依賴的package包/類
private void JbCadastarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JbCadastarActionPerformed
    jbIncluir.setVisible(true);
    jbSalvar.setVisible(false);
    CardLayout cardCadastrar = (CardLayout) Root.getLayout();
    cardCadastrar.show(Root, "JpCadastrar");
}
 
開發者ID:OgumaJr,項目名稱:Entrega-Final,代碼行數:7,代碼來源:Principal.java

示例13: unparsedRadioActionPerformed

import java.awt.CardLayout; //導入方法依賴的package包/類
private void unparsedRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unparsedRadioActionPerformed
    // Add your handling code here:
    CardLayout cl = (CardLayout)typeCardPanel.getLayout ();
    cl.show (typeCardPanel, "unparsedPanel"); // NOI18N
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:TreeEntityDeclCustomizer.java

示例14: users_toggleItemStateChanged

import java.awt.CardLayout; //導入方法依賴的package包/類
private void users_toggleItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_users_toggleItemStateChanged
    if (evt.getStateChange() == ItemEvent.SELECTED) {
        CardLayout cl = (CardLayout) cards_base.getLayout();
        cl.show(cards_base, "users_settings_card");
    }
}
 
開發者ID:isu3ru,項目名稱:java-swing-template,代碼行數:7,代碼來源:Preferences.java

示例15: internalRadioActionPerformed

import java.awt.CardLayout; //導入方法依賴的package包/類
private void internalRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_internalRadioActionPerformed
    // Add your handling code here:
    CardLayout cl = (CardLayout)typeCardPanel.getLayout ();
    cl.show (typeCardPanel, "internalPanel"); // NOI18N
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:TreeEntityDeclCustomizer.java


注:本文中的java.awt.CardLayout.show方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。