org.netbeans.modules.javafx2.samples.PanelConfigureProjectVisual Maven / Gradle / Ivy
The newest version!
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.netbeans.modules.javafx2.samples;
import javax.swing.JPanel;
import org.openide.WizardDescriptor;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
public class PanelConfigureProjectVisual extends JPanel implements HelpCtx.Provider {
private PanelConfigureProject panel;
private PanelProjectLocationVisual projectLocationPanel;
private PanelOptionsVisual optionsPanel;
/** Creates new form PanelInitProject */
public PanelConfigureProjectVisual(PanelConfigureProject panel, String title) {
this.panel = panel;
initComponents();
this.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(PanelConfigureProjectVisual.class, "ACS_NWP1_NamePanel_A11YDesc")); // NOI18N
projectLocationPanel = new PanelProjectLocationVisual(panel);
locationContainer.add(projectLocationPanel, java.awt.BorderLayout.NORTH);
optionsPanel = new PanelOptionsVisual(panel);
optionsContainer.add(optionsPanel, java.awt.BorderLayout.NORTH);
// Provide a name in the title bar.
setName(NbBundle.getMessage(PanelConfigureProjectVisual.class, "LBL_NWP1_ProjectTitleName")); //NOI18N
putClientProperty ("NewProjectWizard_Title", title); //NOI18N
}
boolean valid(WizardDescriptor wizardDescriptor) {
return projectLocationPanel.valid(wizardDescriptor) && optionsPanel.valid(wizardDescriptor);
}
void read (WizardDescriptor d) {
projectLocationPanel.read(d);
optionsPanel.read(d);
}
void store(WizardDescriptor d) {
projectLocationPanel.store(d);
optionsPanel.store(d);
}
/** 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.
*/
private void initComponents() {//GEN-BEGIN:initComponents
java.awt.GridBagConstraints gridBagConstraints;
locationContainer = new javax.swing.JPanel();
jSeparator1 = new javax.swing.JSeparator();
optionsContainer = new javax.swing.JPanel();
setLayout(new java.awt.GridBagLayout());
setPreferredSize(new java.awt.Dimension(500, 340));
setRequestFocusEnabled(false);
locationContainer.setLayout(new java.awt.BorderLayout());
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
add(locationContainer, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new java.awt.Insets(12, 0, 12, 0);
add(jSeparator1, gridBagConstraints);
optionsContainer.setLayout(new java.awt.BorderLayout());
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
add(optionsContainer, gridBagConstraints);
}//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JSeparator jSeparator1;
private javax.swing.JPanel locationContainer;
private javax.swing.JPanel optionsContainer;
// End of variables declaration//GEN-END:variables
/** Help context where to find more about the paste type action.
* @return the help context for this action
*/
@Override
public HelpCtx getHelpCtx() {
return new HelpCtx(PanelConfigureProjectVisual.class.getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy