本文整理汇总了Java中org.jdesktop.layout.GroupLayout类的典型用法代码示例。如果您正苦于以下问题:Java GroupLayout类的具体用法?Java GroupLayout怎么用?Java GroupLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GroupLayout类属于org.jdesktop.layout包,在下文中一共展示了GroupLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private void init() {
setBorder(javax.swing.BorderFactory.createLineBorder(Color.black));
setBackground(new java.awt.Color(255, 255, 255));
GroupLayout dataTrackNamePanelLayout = new org.jdesktop.layout.GroupLayout(this);
setLayout(dataTrackNamePanelLayout);
dataTrackNamePanelLayout.setHorizontalGroup(
dataTrackNamePanelLayout.createParallelGroup(GroupLayout.LEADING).add(0, 148, Short.MAX_VALUE));
dataTrackNamePanelLayout.setVerticalGroup(
dataTrackNamePanelLayout.createParallelGroup(GroupLayout.LEADING).add(0, 528, Short.MAX_VALUE));
NamePanelMouseAdapter mouseAdapter = new NamePanelMouseAdapter();
addMouseListener(mouseAdapter);
addMouseMotionListener(mouseAdapter);
DropListener dndListener = new DropListener(this);
addGhostDropListener(dndListener);
}
示例2: getVisTabbedPane
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private JTabbedPane getVisTabbedPane() {
if(visTabbedPane == null) {
visTabbedPane = new JTabbedPane();
{
parallelView = new JPanel();
//visTabbedPane.addTab("Aggregate View", null, parallelView, null);
GroupLayout parallelViewLayout = new GroupLayout((JComponent)parallelView);
parallelView.setLayout(parallelViewLayout);
}
{
networkGraph = new JPanel();
visTabbedPane.addTab("Graph View", null, networkGraph, null);
visTabbedPane.addTab("TreeMap View", null, getTreeMapView(), null);
visTabbedPane.addTab("Edge Table", null, getEdgeTableViz(), null);
GroupLayout networkGraphLayout = new GroupLayout((JComponent)networkGraph);
networkGraph.setLayout(networkGraphLayout);
networkGraphLayout.setHorizontalGroup(networkGraphLayout.createSequentialGroup()
.add(getNetworkView1(), 0, 684, Short.MAX_VALUE));
networkGraphLayout.setVerticalGroup(networkGraphLayout.createSequentialGroup()
.add(getNetworkView1(), 0, 366, Short.MAX_VALUE));
}
}
return visTabbedPane;
}
示例3: getSidePane
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private JPanel getSidePane() {
if(sidePane == null) {
sidePane = new JPanel();
GroupLayout dataFilterPaneLayout = new GroupLayout((JComponent)sidePane);
sidePane.setLayout(dataFilterPaneLayout);
dataFilterPaneLayout.setHorizontalGroup(dataFilterPaneLayout.createParallelGroup()
.add(GroupLayout.LEADING, getDataFilterPane(), 0, 300, Short.MAX_VALUE)
.add(GroupLayout.LEADING, getDodPane(), 0, 300, Short.MAX_VALUE));
dataFilterPaneLayout.setVerticalGroup(dataFilterPaneLayout.createSequentialGroup()
.addContainerGap()
.add(getDataFilterPane(), GroupLayout.PREFERRED_SIZE, 281, GroupLayout.PREFERRED_SIZE)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(getDodPane(), 0, 201, Short.MAX_VALUE));
}
return sidePane;
}
示例4: getTimeOverviewPane
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private JPanel getTimeOverviewPane() {
if(timeOverviewPane == null) {
timeOverviewPane = new JPanel();
GroupLayout timeOverviewPaneLayout = new GroupLayout((JComponent)timeOverviewPane);
timeOverviewPane.setLayout(timeOverviewPaneLayout);
{
timeRangeSlider = new JRangeSlider(0, 1000, 0, 1000, SwingConstants.VERTICAL);
}
timeOverviewPaneLayout.setHorizontalGroup(timeOverviewPaneLayout.createParallelGroup()
.add(GroupLayout.LEADING, getTimeOverviewView1(timeRangeSlider), 0, 704, Short.MAX_VALUE)
.add(GroupLayout.LEADING, timeRangeSlider, 0, 704, Short.MAX_VALUE));
timeOverviewPaneLayout.setVerticalGroup(timeOverviewPaneLayout.createSequentialGroup()
.add(getTimeOverviewView1(timeRangeSlider), 0, 102, Short.MAX_VALUE)
.add(timeRangeSlider, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE));
}
return timeOverviewPane;
}
示例5: initComponents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/**
* 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() {
JLabel label = new JLabel();
setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
setTitle("Initializing system logic");
setAlwaysOnTop(true);
setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
setFocusable(false);
setResizable(false);
setUndecorated(true);
label.setFont(new java.awt.Font("Arial", 0, 14));
label.setHorizontalAlignment(SwingConstants.CENTER);
label.setText("Starting application, please wait ...");
label.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
GroupLayout layout = new GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.LEADING)
.add(label, GroupLayout.DEFAULT_SIZE, 431, Short.MAX_VALUE));
layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.LEADING)
.add(label, GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE));
pack();
}
示例6: buildContents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/**
* Creates dialog contents with the given title and description.
*
* @param title the title
* @param description the description
*/
private static Component buildContents(String title, String description) {
final JLabel titleLabel = new JLabel(title);
final Font f = titleLabel.getFont();
titleLabel.setFont(f.deriveFont(Font.BOLD, f.getSize()*1.2f));
final FlowLabel descriptionLabel = new FlowLabel(description);
final JPanel panel = new JPanel();
final GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutocreateGaps(true);
layout.setAutocreateContainerGaps(false);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.LEADING, true)
.add(titleLabel)
.add(descriptionLabel));
layout.setVerticalGroup(
layout.createSequentialGroup()
.add(titleLabel)
.addPreferredGap(LayoutStyle.UNRELATED)
.add(descriptionLabel));
return panel;
}
示例7: ActuatorsAndExternalLoadsPanel
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/** Creates new form ActuatorsAndExternalLoadsPanel */
public ActuatorsAndExternalLoadsPanel(AbstractToolModelWithExternalLoads toolModel, Model model, boolean includeActuatorsPanel) {
this.toolModel = toolModel;
this.model = model;
if (numFormat instanceof DecimalFormat) {
((DecimalFormat) numFormat).applyPattern("#,##0.#########");
}
initComponents();
bindPropertiesToComponents();
if(!includeActuatorsPanel) actuatorsPanel.setVisible(false);
externalLoadsFileName.setExtensionsAndDescription(".xml", "External forces");
externalLoadsModelKinematicsFileName.setExtensionsAndDescription(".mot,.sto", "Model kinematics for external loads");
// Add checkbox titled borders to external loads panel
externalLoadsPanelCheckBox.setForeground(new Color(0,70,213));
externalLoadsPanel.setBorder(new ComponentTitledBorder(externalLoadsPanelCheckBox, externalLoadsPanel, BorderFactory.createEtchedBorder()));
// Re-layout panels after we've removed various parts...
((GroupLayout)this.getLayout()).layoutContainer(this);
// Default to Append rather than replace AcuatorSet
toolModel.setReplaceForceSet(false);
updatePanel();
}
示例8: initComponents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private void initComponents() {
JScrollPane jScrollPane1 = new JScrollPane();
editorPane = new JEditorPane();
JButton helpWindowClose = new JButton();
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
setTitle("JavaANPR - Help");
setResizable(false);
jScrollPane1.setViewportView(editorPane);
helpWindowClose.setFont(new java.awt.Font("Arial", 0, 11));
helpWindowClose.setText("Close");
helpWindowClose.addActionListener(this::helpWindowCloseActionPerformed);
GroupLayout layout = new GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup().addContainerGap()
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(GroupLayout.TRAILING, helpWindowClose)
.add(jScrollPane1, GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE))
.addContainerGap()));
layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.LEADING).add(GroupLayout.TRAILING,
layout.createSequentialGroup().addContainerGap()
.add(jScrollPane1, GroupLayout.DEFAULT_SIZE, 461, Short.MAX_VALUE)
.addPreferredGap(LayoutStyle.RELATED).add(helpWindowClose).addContainerGap()));
pack();
}
示例9: initComponents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private void initComponents() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception ignored) {}
jComboBoxCertificats = new JComboBox();
jLabelCertificat = new JLabel();
jLabelContrasenya = new JLabel();
jPasswordField = new JPasswordField();
jButtonSignar = new JButton();
jComboBoxCertificats.setModel(
new DefaultComboBoxModel(
new String[] {missatges.getString("msg.info.carregant")}));
jComboBoxCertificats.setEnabled(false);
jLabelCertificat.setText(missatges.getString("label.certificat"));
jLabelContrasenya.setText(missatges.getString("label.contrasenya"));
jPasswordField.setEnabled(false);
jButtonSignar.setText(missatges.getString("accio.signar"));
jButtonSignar.setEnabled(false);
GroupLayout layout = new GroupLayout(jPanel);
jPanel.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
.add(jLabelContrasenya)
.add(jLabelCertificat))
.add(18, 18, 18)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(jPasswordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 194, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(jComboBoxCertificats, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 194, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
.add(jButtonSignar))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabelCertificat)
.add(jComboBoxCertificats, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabelContrasenya)
.add(jPasswordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButtonSignar)
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jButtonSignar.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {jButtonSignarActionPerformed(e);}
});
add(jPanel, BorderLayout.CENTER);
String bgColor = getParameter("bgColor");
if (bgColor == null) {
setBackground(Color.WHITE);
jPanel.setBackground(Color.WHITE);
} else {
setBackground(new Color(Integer.valueOf(bgColor, 16).intValue(), true));
jPanel.setBackground(new Color(Integer.valueOf(bgColor, 16).intValue()));
}
}
示例10: drawLayout
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
private void drawLayout() {
GroupLayout layout = new GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout.createParallelGroup(1)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(1)
.add(layout.createSequentialGroup()
.add(imageHolder, -2, 297, -2)
.addPreferredGap(1)
.add(layout.createParallelGroup(1)
.add(jScrollPanel, -2, 274, -2)
.add(levelHolder, -1, 274, 32767)))
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(2)
.add(1, optionC, -1, 203, 32767)
.add(1, layout.createSequentialGroup()
.add(buttonPublico, -1, -1, 32767)
.addPreferredGap(0)
.add(buttonTelefone, -2, 100, -2))
.add(1, optionA, -1, 203, 32767))
.addPreferredGap(0)
.add(layout.createParallelGroup(1)
.add(button50, -2, 99, -2)
.add(optionB, -2, 218, -2)
.add(layout.createSequentialGroup()
.add(optionD, -2, 218, -2)
.addPreferredGap(0)
.add(buttonDesistir, -1, -1, 32767)
.addPreferredGap(0)
.add(buttonConfirmar)))))
.addContainerGap()));
layout.setVerticalGroup(layout.createParallelGroup(1)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(2, false)
.add(imageHolder, -2, 283, -2)
.add(1, layout.createSequentialGroup()
.add(levelHolder, -2, 26, -2)
.addPreferredGap(0, -1, 32767)
.add(jScrollPanel, -2, 190, -2)))
.addPreferredGap(1)
.add(layout.createParallelGroup(1)
.add(layout.createParallelGroup(3)
.add(buttonTelefone)
.add(button50))
.add(buttonPublico))
.add(11, 11, 11)
.add(layout.createParallelGroup(2)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(1)
.add(optionA)
.add(optionB))
.add(16, 16, 16)
.add(layout.createParallelGroup(3)
.add(optionC)
.add(optionD)))
.add(layout.createParallelGroup(3)
.add(buttonConfirmar)
.add(buttonDesistir)))
.addContainerGap()));
setVisible(true);
}
示例11: initComponents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
keyStoreFileChooser = new JFileChooser();
historyPanel = new JPanel();
previousLabel = new JLabel();
previousComboBox = new JComboBox();
separator1 = new JSeparator();
setLayout(new BorderLayout());
keyStoreFileChooser.setControlButtonsAreShown(false);
add(keyStoreFileChooser, BorderLayout.CENTER);
previousLabel.setDisplayedMnemonic(Integer.parseInt(NbBundle.getMessage(SelectKeyStorePanel.class, "IDX_PreviousKeyStores")));
previousLabel.setLabelFor(previousComboBox);
previousLabel.setText(NbBundle.getMessage(SelectKeyStorePanel.class, "LBL_PreviousKeyStores"));
previousComboBox.setModel(new DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
previousComboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
previousComboBoxActionPerformed(evt);
}
});
GroupLayout historyPanelLayout = new GroupLayout(historyPanel);
historyPanel.setLayout(historyPanelLayout);
historyPanelLayout.setHorizontalGroup(
historyPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(historyPanelLayout.createSequentialGroup()
.addContainerGap()
.add(historyPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(separator1, GroupLayout.DEFAULT_SIZE, 405, Short.MAX_VALUE)
.add(historyPanelLayout.createSequentialGroup()
.add(previousLabel)
.addPreferredGap(LayoutStyle.RELATED)
.add(previousComboBox, 0, 262, Short.MAX_VALUE)))
.addContainerGap())
);
historyPanelLayout.setVerticalGroup(
historyPanelLayout.createParallelGroup(GroupLayout.LEADING)
.add(historyPanelLayout.createSequentialGroup()
.addContainerGap()
.add(historyPanelLayout.createParallelGroup(GroupLayout.BASELINE)
.add(previousLabel)
.add(previousComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(separator1, GroupLayout.PREFERRED_SIZE, 10, GroupLayout.PREFERRED_SIZE))
);
add(historyPanel, BorderLayout.NORTH);
}
示例12: initComponents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/** 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.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
keyStoreFileLabel = new JLabel();
keyStorePasswordLabel = new JLabel();
keyStoreFileTextField = new JTextField();
keyStorePasswordField = new JPasswordField();
keyStoreFileLabel.setLabelFor(keyStoreFileTextField);
keyStoreFileLabel.setText(NbBundle.getMessage(EnterKeyStorePasswordPanel.class, "LBL_KeyStoreFile"));
keyStorePasswordLabel.setDisplayedMnemonic(Integer.parseInt(NbBundle.getBundle(EnterKeyStorePasswordPanel.class).getString("IDX_KeyStorePassword")));
keyStorePasswordLabel.setLabelFor(keyStorePasswordField);
keyStorePasswordLabel.setText(NbBundle.getMessage(EnterKeyStorePasswordPanel.class, "LBL_KeyStorePassword"));
keyStoreFileTextField.setEditable(false);
GroupLayout layout = new GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(GroupLayout.TRAILING, keyStorePasswordLabel)
.add(GroupLayout.TRAILING, keyStoreFileLabel))
.addPreferredGap(LayoutStyle.RELATED)
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(keyStoreFileTextField, GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
.add(keyStorePasswordField, GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(GroupLayout.BASELINE)
.add(keyStoreFileLabel)
.add(keyStoreFileTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(layout.createParallelGroup(GroupLayout.BASELINE)
.add(keyStorePasswordLabel)
.add(keyStorePasswordField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
}
示例13: showDialog
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
public static Object showDialog(
Component parent,
String title,
Component content,
int messageType,
Icon icon,
int optionType,
Object[] options,
Object initialValue,
Object key,
String disableMsg)
{
// set up the "don't show again" check box, if applicable
final JCheckBox disableCheck;
if (key != null) {
if (DialogUtils.isDisabled(key)) return null;
disableCheck = new JCheckBox(disableMsg);
final JPanel panel = new JPanel();
final GroupLayout layout = new GroupLayout(panel);
panel.setLayout(layout);
layout.setAutocreateGaps(true);
layout.setAutocreateContainerGaps(false);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.LEADING, true)
.add(content)
.add(disableCheck));
layout.setVerticalGroup(
layout.createSequentialGroup()
.add(content)
.addPreferredGap(LayoutStyle.UNRELATED,
GroupLayout.DEFAULT_SIZE, Integer.MAX_VALUE)
.add(disableCheck));
content = panel;
}
else {
disableCheck = null;
}
// build the option pane and dialog
final JOptionPane opt = new JOptionPane(
content, messageType, optionType, icon, options, initialValue);
final JDialog dialog = opt.createDialog(parent, title);
// FIXME: setModal() is obsolete. Use setModalityType() in 1.6+.
// d.setModalityType(JDialog.ModalityType.APPLICATION_MODAL);
dialog.setModal(true);
dialog.setLocationRelativeTo(parent);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setResizable(true);
dialog.pack();
dialog.setVisible(true);
if (disableCheck != null && disableCheck.isSelected()) {
DialogUtils.setDisabled(key, true);
}
return opt.getValue();
}
示例14: InverseDynamicsToolPanel
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/** Creates new form AnalyzeAndForwardToolPanel */
public InverseDynamicsToolPanel(Model model) throws IOException {
toolModel = new InverseDynamicsToolModel(model);
if (numFormat instanceof DecimalFormat) {
((DecimalFormat) numFormat).applyPattern("#,##0.############");
}
initComponents();
helpButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
String path = BrowserLauncher.isConnected() ? "http://simtk-confluence.stanford.edu:8080/display/OpenSim30/Inverse+Dynamics" : TheApp.getUsersGuideDir() + "Inverse+Dynamics.html";
BrowserLauncher.openURL(path);
}
});
bindPropertiesToComponents();
// Add checkbox titled borders to RRA panel
//rraPanelCheckBox.setForeground(new Color(0,70,213));
//rraPanel.setBorder(new ComponentTitledBorder(rraPanelCheckBox, rraPanel, BorderFactory.createEtchedBorder()));
// File chooser settings
outputDirectory.setIncludeOpenButton(true);
outputDirectory.setDirectoriesOnly(true);
outputDirectory.setCheckIfFileExists(false);
setSettingsFileDescription("Settings file for "+modeName);
// disable for now
plotMetricsPanel.setVisible(false); // Show plots only for RRA, CMC for now as the more time consuming steps
// Set file filters for inverse dynamics tool inputs
//statesFileName1.setExtensionsAndDescription(".sto", "States data for "+modeName);
coordinatesFileName1.setExtensionsAndDescription(".mot,.sto", "Motion data for "+modeName);
// Actuators & External Loads tab
actuatorsAndExternalLoadsPanel = new ActuatorsAndExternalLoadsPanel(toolModel, toolModel.getOriginalModel(),
false);
jTabbedPane1.addTab( "External Loads", actuatorsAndExternalLoadsPanel);
// Re-layout panels after we've removed various parts...
((GroupLayout)mainSettingsPanel.getLayout()).layoutContainer(mainSettingsPanel);
updateStaticFields();
updateFromModel();
toolModel.addObserver(this);
}
示例15: initComponents
import org.jdesktop.layout.GroupLayout; //导入依赖的package包/类
/** 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() {
jLabel1 = new javax.swing.JLabel();
cameraPlatformComboBox = new javax.swing.JComboBox();
jLabel2 = new javax.swing.JLabel();
diveNumberTextField = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
tapeNumberTextField = new javax.swing.JTextField();
hdCheckBox = new javax.swing.JCheckBox();
jLabel1.setText("Camera Platform:");
cameraPlatformComboBox.setModel(new DefaultComboBoxModel(listCameraPlatforms()));
jLabel2.setText("Dive Number:");
jLabel3.setText("Tape Number:");
hdCheckBox.setText("Check if High Definition");
hdCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
hdCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0));
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
layout.setHorizontalGroup(
layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(jLabel1)
.add(jLabel2)
.add(jLabel3))
.addPreferredGap(LayoutStyle.RELATED)
.add(layout.createParallelGroup(GroupLayout.LEADING)
.add(cameraPlatformComboBox, 0, 342, Short.MAX_VALUE)
.add(diveNumberTextField, GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)
.add(tapeNumberTextField, GroupLayout.DEFAULT_SIZE, 342, Short.MAX_VALUE)))
.add(layout.createSequentialGroup()
.add(157, 157, 157)
.add(hdCheckBox)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(GroupLayout.BASELINE)
.add(jLabel1)
.add(cameraPlatformComboBox, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(layout.createParallelGroup(GroupLayout.BASELINE)
.add(jLabel2)
.add(diveNumberTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(layout.createParallelGroup(GroupLayout.BASELINE)
.add(jLabel3)
.add(tapeNumberTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(LayoutStyle.RELATED)
.add(hdCheckBox)
.addContainerGap(19, Short.MAX_VALUE))
);
this.setLayout(layout);
}