当前位置: 首页>>代码示例>>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;未经允许,请勿转载。