本文整理汇总了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();
}
}
示例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());
}
}
示例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;
}
示例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");
}
示例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);
}
示例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
}
示例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());
}
}
示例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");
}
示例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());
}
}
示例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());
}
示例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());
}
示例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");
}
示例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
}
示例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");
}
}
示例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
}