项目:incubator-netbeans
文件:ResultViewPanel.java
public ResultViewPanel(SearchTask searchTask) {
setLayout(resultViewCards = new cardlayout());
this.searchComposition = searchTask.getComposition();
this.searchTask = searchTask;
SearchResultsdisplayer<?> displayer =
searchComposition.getSearchResultsdisplayer();
setName(displayer.getTitle());
displayer.setInfoNode(this.createListener().getInfoNode());
resultsPanel = new JPanel();
resultsPanel.setLayout(
new BoxLayout(resultsPanel,BoxLayout.PAGE_AXIS));
SearchResultsdisplayer<?> disp =
searchComposition.getSearchResultsdisplayer();
visualComponent = disp.getVisualComponent();
lookup = (visualComponent instanceof Lookup.Provider)
? ((Lookup.Provider) visualComponent).getLookup()
: Lookup.EMPTY;
resultsPanel.add(visualComponent);
add(resultsPanel,CARD_NAME_RESULTS);
showInfo(UiUtils.getText("TEXT_WAITING_FOR_PREVIoUS")); //NOI18N
}
项目:incubator-netbeans
文件:DefaultProjectRenamePanel.java
/**
* Creates new form DefaultProjectRenamePanel
*/
public DefaultProjectRenamePanel(ProgressHandle handle,Project project,String name) {
this.project = project;
this.handle = handle;
if (name == null) {
name = ProjectUtils.get@R_183_4045@ion(project).getdisplayName();
}
initComponents();
projectName.setText(name);
projectName.getDocument().addDocumentListener(this);
updateProjectFolder();
validateDialog();
if (Boolean.getBoolean("org.netbeans.modules.project.uiapi.DefaultProjectOperations.showProgress")) {
((cardlayout) progress.getLayout()).show(progress,"progress");
}
}
/**
* Creates new form ProjectcopyPanel
*/
public ProjectcopyPanel(ProgressHandle handle,boolean isMove) {
this.project = project;
this.isMove = isMove;
this.handle = handle;
initComponents();
setProject();
projectName.getDocument().addDocumentListener(this);
projectLocation.getDocument().addDocumentListener(this);
if (isMove) {
nameLabel.setVisible(false);
projectName.setVisible(false);
warningTextArea.setVisible(false);
}
if (Boolean.getBoolean("org.netbeans.modules.project.uiapi.DefaultProjectOperations.showProgress")) {
((cardlayout) progress.getLayout()).show(progress,"progress");
}
}
项目:jdk8u-jdk
文件:java_awt_cardlayout.java
@Override
protected void validate(cardlayout before,cardlayout after) {
super.validate(before,after);
try {
Vector a = (Vector) VECTOR.get(after);
Vector b = (Vector) VECTOR.get(before);
int size = a.size();
if (size != b.size()) {
throw new Error("different content");
}
for (int i = 0; i < size; i++) {
super.validator.validate(NAME.get(a.get(i)),NAME.get(b.get(i)));
super.validator.validate(COMP.get(a.get(i)),COMP.get(b.get(i)));
}
}
catch (Exception exception) {
throw new Error(exception);
}
}
项目:incubator-netbeans
文件:ConfirmationPanel.java
@Messages({
"LBL_FormattingQuestion=Recursively format the selected files and folders?","LBL_FormattingInProgress=Formatting:"
})
public ConfirmationPanel(ProgressHandle handle) {
initComponents();
setLayout(new cardlayout());
add(new JLabel(Bundle.LBL_FormattingQuestion()),PANEL_QUESTION);
JPanel progress = new JPanel(new BorderLayout());
JLabel inProgressLabel = new JLabel(Bundle.LBL_FormattingInProgress());
inProgressLabel.setBorder(new EmptyBorder(0,6,0));
progress.add(inProgressLabel,BorderLayout.norTH);
progress.add(ProgressHandleFactory.createProgressComponent(handle),BorderLayout.CENTER);
add(progress,PANEL_PROGRESS);
((cardlayout) getLayout()).show(this,PANEL_QUESTION);
}
项目:incubator-netbeans
文件:LiveFlatProfilePanel.java
private void initComponents() {
setLayout(new BorderLayout());
noresultsPanel = new JPanel();
noresultsPanel.setLayout(new BorderLayout());
noresultsPanel.setBorder(BorderFactory.createEmptyBorder(12,12,12));
final JLabel noresultsLabel = new JLabel(NO_RESULTS_STRING);
noresultsLabel.setFont(noresultsLabel.getFont().deriveFont(14));
noresultsLabel.setEnabled(false);
noresultsPanel.add(noresultsLabel,BorderLayout.norTH);
resultsTable = new JPanel(new cardlayout());
resultsTable.add(noresultsLabel,"norESULTS"); // NOI18N
add(resultsTable,BorderLayout.CENTER);
}
public void valueChanged(ListSelectionEvent evt) {
if (evt.getValueIsAdjusting() == false && browsersModel.isAdjusting() == false) {
int index = browsersList.getSelectedindex();
String panelID = browsersModel.getPropertyPanelID(index);
((cardlayout) customPropertyPanel.getLayout()).show(customPropertyPanel,panelID);
nameTextField.setText(browsersModel.getbrowserName(index));
if (browsersModel.isDefaultbrowser(index)) {
// if any of default browsers is selected then browser name won't be editable and remove button disabled
nameTextField.setEditable(false);
removeButton.setEnabled(false);
} else {
nameTextField.setEditable(true);
removeButton.setEnabled(true);
}
browsersModel.setSelectedValue(browsersList.getSelectedValue());
}
}
项目:openjdk-jdk10
文件:CardTest.java
@Override
public void actionPerformed(ActionEvent e) {
String arg = e.getActionCommand();
if ("first".equals(arg)) {
((cardlayout) cards.getLayout()).first(cards);
} else if ("next".equals(arg)) {
((cardlayout) cards.getLayout()).next(cards);
} else if ("prevIoUs".equals(arg)) {
((cardlayout) cards.getLayout()).prevIoUs(cards);
} else if ("last".equals(arg)) {
((cardlayout) cards.getLayout()).last(cards);
} else {
((cardlayout) cards.getLayout()).show(cards,arg);
}
}
项目:incubator-netbeans
文件:ResourceWizardPanel.java
/** Gets component to display. Implements superclass abstract method.
* @return this instance */
protected Component createComponent() {
JPanel panel = new JPanel(new cardlayout());
// Accessibility
panel.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(ResourceWizardPanel.class).getString("ACS_ResourceWizardPanel"));
panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX,Integer.valueOf(1));
String msgKey = testWizard ? "TXT_SelectTestResource" //NOI18N
: "TXT_SelectResource"; //NOI18N
panel.setName(NbBundle.getMessage(ResourceWizardPanel.class,msgKey));
panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);
panel.add(getUI(),CARD_GUI);
return panel;
}
项目:incubator-netbeans
文件:HardStringWizardPanel.java
/** Reads settings at the start when the panel comes to play. Overrides superclass method. */
@Override
public void readSettings(I18nWizardDescriptor.Settings settings) {
super.readSettings(settings);
getUI().setSourceMap(getMap());
hasFoundStrings = foundStrings(getMap());
JPanel panel = (JPanel)getComponent();
if (hasFoundStrings) {
panel.add(getUI(),CARD_GUI);
((cardlayout) panel.getLayout()).show(panel,CARD_GUI);
} else {
panel.add(getMessageComp(),CARD_MSG);
((cardlayout) panel.getLayout()).show(panel,CARD_MSG);
}
}
项目:incubator-netbeans
文件:TestStringWizardPanel.java
/** Gets component to display. Implements superclass abstract method.
* @return this instance */
protected Component createComponent() {
JPanel panel = new JPanel(new cardlayout());
panel.getAccessibleContext().setAccessibleDescription(
NbBundle.getMessage(
TestStringWizardPanel.class,"ACS_TestStringWizardPanel")); //NOI18N
panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX,Integer.valueOf(2));
panel.setName(
NbBundle.getMessage(TestStringWizardPanel.class,"TXT_FoundMissingResource")); //NOI18N
panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);
return panel;
}
项目:jdk8u-jdk
文件:CardTest.java
@Override
public void actionPerformed(ActionEvent e) {
String arg = e.getActionCommand();
if ("first".equals(arg)) {
((cardlayout) cards.getLayout()).first(cards);
} else if ("next".equals(arg)) {
((cardlayout) cards.getLayout()).next(cards);
} else if ("prevIoUs".equals(arg)) {
((cardlayout) cards.getLayout()).prevIoUs(cards);
} else if ("last".equals(arg)) {
((cardlayout) cards.getLayout()).last(cards);
} else {
((cardlayout) cards.getLayout()).show(cards,arg);
}
}
@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());
}
}
项目:rapidminer
文件:OpenProcessCard.java
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;
}
项目:openjdk-jdk10
文件:java_awt_cardlayout.java
@Override
protected void validate(cardlayout before,COMP.get(b.get(i)));
}
}
catch (Exception exception) {
throw new Error(exception);
}
}
项目:VASSAL-src
文件:MultiImagePicker.java
public void swap(int index1,int index2) {
Component[] components = new Component[imageListElements.size()];
for (int i = 0; i < imageListElements.size(); i++) {
components[i] = multiPanel.getComponent(i);
}
multiPanel.removeAll();
cl = new cardlayout();
multiPanel.setLayout(cl);
for (int i = 0; i < imageListElements.size(); i++) {
Component c = null;
if (i == index1) {
c = components[index2];
}
else if (i == index2) {
c = components[index1];
}
else {
c = components[i];
}
multiPanel.add(c,"Image " + (i+1));
}
imageList.setSelectedindex(index2);
showSelected();
}
项目:GIFKR
文件:ChannelSettingsPanel.java
public void initializeComponents() {
channelBox = new JCheckBox("Filter by channel",false);
allSets = new SettingsPanel(r);
rSets = new SettingsPanel(r);
gSets = new SettingsPanel(r);
bSets = new SettingsPanel(r);
channelPane = new JTabbedPane();
channelPane.add("Red",rSets);
channelPane.add("Green",gSets);
channelPane.addTab("Blue",bSets);
cardPanel = new JPanel(new cardlayout());
cardPanel.add(allSets,"all");
cardPanel.add(channelPane,"rgb");
}
项目:defense-solutions-proofs-of-concept
文件:MainMenuJPanel.java
private void showCard(String cardName) {
//Special handling for certain cards
if ("Overlays Card".equals(cardName)) {
refreshTOC();
}
cardlayout layout = (cardlayout) (getLayout());
layout.show(this,cardName);
}
项目:JavaGraph
文件:SettingsPanel.java
/** Sets the Syntax help for a given combination of exploration key and setting kind. */
public void setHelp(ExploreKey key,SettingKey kind) {
String name = getName(key,kind);
if (this.kNownHelp.add(name)) {
JComponent help = this.helpFactory.createHelp(key,kind);
JScrollPane scrollPane = new JScrollPane(help);
getHelpPanel().add(scrollPane,name);
}
cardlayout cl = (cardlayout) getHelpPanel().getLayout();
cl.show(getHelpPanel(),name);
}
项目:JavaGraph
文件:SettingsPanel.java
private JPanel computeHelpPanel() {
JPanel result = new JPanel(new cardlayout());
// add a dummy panel to ensure first help screen really shows up
result.add(new JPanel(),"dummy");
result.setBorder(new CompoundBorder(getDialog().createEmptyBorder(),BorderFactory.createTitledBorder("Help")));
result.setPreferredSize(new Dimension(200,100));
return result;
}
项目:incubator-netbeans
文件:cardlayoutBeanInfo.java
@Override
protected PropertyDescriptor[] createPropertyDescriptors() throws IntrospectionException {
PropertyDescriptor[] pds = new PropertyDescriptor[] {
createRW(cardlayout.class,"hgap"),// NOI18N
createRW(cardlayout.class,"vgap"),// NOI18N
};
return pds;
}
项目:incubator-netbeans
文件:FoldOptionsPanel.java
private void languageSelected() {
String[] sel = (String[])langSelect.getSelectedItem();
if (sel == null) {
return;
}
String mime = sel[0];
if (currentPreferences != null) {
currentPreferences.removePreferencechangelistener(wPrefL);
}
currentPreferences = ctrl.prefs(mime);
JComponent panel = panels.get(mime);
String parentMime = MimePath.parse(mime).getInheritedType();
if (parentMime != null) {
parentPrefs = ctrl.prefs(parentMime);
} else {
parentPrefs = null;
}
if (panel == null) {
panel = new DefaultFoldingOptions(mime,currentPreferences);
if (panel instanceof CustomizerWithDefaults) {
((CustomizerWithDefaults)panel).setDefaultPreferences(parentPrefs);
}
panels.put(mime,panel);
content.add(panel,mime);
}
((cardlayout)content.getLayout()).show(content,mime);
currentPreferences.addPreferencechangelistener(wPrefL);
useDefaults.setVisible(!"".equals(mime)); // NOI18N
preferenceChange(null);
}
项目:incubator-netbeans
文件:DefaultProjectRenamePanel.java
public void showProgress() {
projectFolder.setEnabled(false);
projectName.setEnabled(false);
alsoRenameFolder.setEnabled(false);
progress.setVisible(true);
((cardlayout) progress.getLayout()).last(progress);
}
public void showProgress() {
projectFolder.setEnabled(false);
projectLocation.setEnabled(false);
projectName.setEnabled(false);
browse.setEnabled(false);
((cardlayout) progress.getLayout()).show(progress,"progress");
}
项目:incubator-netbeans
文件:DiffToRevision.java
@Override
public void actionPerformed (ActionEvent e) {
if (e.getSource() == panel.cmbDiffKind) {
DiffToRevisionKind rebaseKind = (DiffToRevisionKind) panel.cmbDiffKind.getSelectedItem();
panel.lblDescription.setText(rebaseKind.getDescription());
((cardlayout) panel.panelDiffKind.getLayout()).show(panel.panelDiffKind,rebaseKind.getId());
okButton.setEnabled(rebaseKind.isValid());
}
}
项目:incubator-netbeans
文件:Rebase.java
@Override
public void actionPerformed (ActionEvent e) {
if (e.getSource() == panel.cmbRebaseType) {
RebaseKind rebaseKind = (RebaseKind) panel.cmbRebaseType.getSelectedItem();
panel.lblDescription.setText(rebaseKind.getDescription());
((cardlayout) panel.panelKind.getLayout()).show(panel.panelKind,rebaseKind.getId());
okButton.setEnabled(rebaseKind.isValid());
}
}
项目:Fodder-OOM_Project
文件:LoginPage.java
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");
}
项目:jdk8u-jdk
文件:MenuBarSetFont.java
public static void main(final String[] args) throws Exception {
if (sun.awt.OSInfo.getoSType() == sun.awt.OSInfo.OSType.MACOSX) {
System.err.println("This test is not for OS X. Menu.setFont() is not supported on OS X.");
return;
}
//Components initialization.
frame.setMenuBar(mb);
mb.setFont(new Font("Helvetica",Font.ITALIC,5));
final Button button = new Button("Click Me");
button.addActionListener(new Listener());
frame.setLayout(new cardlayout());
frame.add(button,"First");
frame.setSize(400,400);
frame.setVisible(true);
sleep();
final int fInsets = frame.getInsets().top; //Frame insets without menu.
addMenu();
final int fMenuInsets = frame.getInsets().top; //Frame insets with menu.
final int menuBarHeight = fMenuInsets - fInsets;
// There is no way to change menubar height on windows. But on windows
// we can try to split menubar in 2 rows.
for (int i = 0; i < 100 && fMenuInsets == frame.getInsets().top; ++i) {
// Fill whole menubar.
addMenu();
}
mb.remove(0);
frame.validate();
sleep();
// Test execution.
// On XToolkit,menubar font should be changed to 60.
// On WToolkit,menubar font should be changed to default and menubar
// should be splitted in 2 rows.
mb.setFont(new Font("Helvetica",60));
sleep();
final Robot r = new Robot();
r.setAutoDelay(200);
final Point pt = frame.getLocation();
r.mouseMove(pt.x + frame.getWidth() / 2,pt.y + fMenuInsets + menuBarHeight / 2);
r.mousepress(InputEvent.BUTTON1_MASK);
r.mouseRelease(InputEvent.BUTTON1_MASK);
sleep();
frame.dispose();
if (clicked) {
fail("Font was not changed");
}
}
项目:jdk8u-jdk
文件:java_awt_cardlayout.java
@Override
protected cardlayout getobject() {
cardlayout layout = new cardlayout();
layout.addLayoutComponent(new JLabel("a"),"a");
layout.addLayoutComponent(new JLabel("b"),"b");
layout.addLayoutComponent(new JLabel("c"),"c");
return layout;
}
项目:jdk8u-jdk
文件:CardTest.java
CardPanel(ActionListener actionListener) {
listener = actionListener;
setLayout(new cardlayout());
add("one",create(new FlowLayout()));
add("two",create(new BorderLayout()));
add("three",create(new GridLayout(2,2)));
add("four",create(new BorderLayout(10,10)));
add("five",create(new FlowLayout(FlowLayout.LEFT,10,10)));
add("six",2,10)));
}
项目:incubator-netbeans
文件:InitPanel.java
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
}
项目:incubator-netbeans
文件:TreeEntityDeclCustomizer.java
/**
*/
protected final void updateTypeComponent () {
cardlayout cl = (cardlayout)typeCardPanel.getLayout ();
if ( getEntityDecl ().getType () == TreeEntityDecl.TYPE_INTERNAL ) {
internalRadio.setSelected (true);
cl.show (typeCardPanel,"internalPanel"); // NOI18N
} else if ( getEntityDecl ().getType () == TreeEntityDecl.TYPE_EXTERNAL ) {
externalRadio.setSelected (true);
cl.show (typeCardPanel,"externalPanel"); // NOI18N
} else {
unparsedRadio.setSelected (true);
cl.show (typeCardPanel,"unparsedPanel"); // NOI18N
}
}
项目:incubator-netbeans
文件:ResourceWizardPanel.java
/** Reads settings at the start when the panel comes to play. Overrides superclass method. */
@Override
public void readSettings(I18nWizardDescriptor.Settings settings) {
super.readSettings(settings);
getUI().setSourceMap(getMap());
Container container = (Container) getComponent();
((cardlayout) container.getLayout()).show(container,CARD_GUI);
}
项目:incubator-netbeans
文件:HardStringWizardPanel.java
/** Gets component to display. Implements superclass abstract method.
* @return this instance */
protected Component createComponent() {
JPanel panel = new JPanel(new cardlayout());
panel.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(HardStringWizardPanel.class).getString("ACS_HardStringWizardPanel"));//NOI18N
panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX,Integer.valueOf(3));
panel.setName(NbBundle.getBundle(HardStringWizardPanel.class).getString("TXT_ModifyStrings"));//NOI18N
panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);
return panel;
}
项目:incubator-netbeans
文件:RepositorySelectorBuilder.java
private void displayEmptyPanel() {
if (!emptyPanelInitialized) {
cardsPanel.add(new JPanel(),EMPTY_PANEL);
emptyPanelInitialized = true;
}
((cardlayout) cardsPanel.getLayout()).show(cardsPanel,EMPTY_PANEL);
if (repositoryFormVisible) {
repositoryFormsPanel.removechangelistener(repositoryFormPanelListener);
repositoryFormVisible = false;
}
setDataValid(true);
}
@Override
protected JComponent createInfoPanel() {
JPanel result = new JPanel();
result.setLayout(new cardlayout());
result.add(getSingleInfoPanel(),this.SINGLE_INFO_KEY);
result.add(getSplitInfoPanel(),this.SPLIT_INFO_KEY);
result.setBorder(null);
return result;
}
项目:JavaGraph
文件:ButtonEditor.java
/**
* Returns the panel holding the content editors.
*/
private JPanel getContentPanel() {
if (this.contentPanel == null) {
this.contentPanel = new JPanel(new cardlayout());
}
return this.contentPanel;
}
项目:rapidminer
文件:AbstractToRepositoryStep.java
/**
* Shows the card specified by id,e.g. {@link #CARD_ID_CHOOSER} or {@link #CARD_ID_PROGRESS}.
*
* @param cardId
* the id of the card
*/
private void showCard(final String cardId) {
SwingTools.invokelater(new Runnable() {
@Override
public void run() {
((cardlayout) mainPanel.getLayout()).show(mainPanel,cardId);
}
});
}
项目:apcs_final
文件:AdBlockerFrame.java
public AdBlockerFrame()
{
super();
setSystemLookAndFeel();
setTitle(title);
resized();
cardlayout = new cardlayout();
getContentPane().setLayout(cardlayout);
ClosableWindow cw = new ClosableWindow(this);
addWindowListener(cw);
ResizableComponent rs = new ResizableComponent(this);
addComponentListener(rs);
System.out.println("opening Window");
menuPanel = new MenuPanel(title,subtitle,width,height,this);
helpPanel = new HelpPanel(title,this);
newGamePanel = new NewGamePanel(title,this);
add(menuPanel,"menuPanel");
add(helpPanel,"helpPanel");
add(newGamePanel,"newGamePanel");
playBackgroundMusic();
setDefaultCloSEOperation(JFrame.EXIT_ON_CLOSE);
setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);
setUndecorated(true);
setVisible(true);
}
项目:rapidminer
文件:LoadingContentPane.java
/**
* Tells the LoadingContentPane that the content has finished loading,switches to the actual
* content pane.
**/
public void loadingFinished() {
if (loading) {
((cardlayout) (getLayout())).last(LoadingContentPane.this);
loading = false;
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。