List of usage examples for java.awt.event ItemEvent getSource
public Object getSource()
From source file:org.jcurl.demo.tactics.BroomPromptSwingBean.java
public void itemStateChanged(final ItemEvent e) { if (log.isDebugEnabled()) log.debug(e.getSource()); if (e.getSource() == rock) { updateIndex();/*from ww w . jav a2 s. c om*/ return; } log.warn("Unprocessed event from " + e.getSource()); }
From source file:net.atomique.ksar.graph.Graph.java
public Graph(kSar hissar, GraphConfig g, String Title, String hdrs, int firstdatacolumn, SortedTreeNode pp) { mysar = hissar;//from w w w . jav a 2 s.com graphtitle = Title; graphconfig = g; printCheckBox = new JCheckBox(graphtitle, printSelected); printCheckBox.addItemListener((ItemEvent evt) -> { if (evt.getSource() == printCheckBox) { printSelected = printCheckBox.isSelected(); } }); firstDataColumn = firstdatacolumn; if (pp != null) { TreeNodeInfo infotmp = new TreeNodeInfo(Title, this); SortedTreeNode nodetmp = new SortedTreeNode(infotmp); mysar.add2tree(pp, nodetmp); } HeaderStr = hdrs.split("\\s+"); create_DataStore(); }
From source file:SplineAnim.java
public void itemStateChanged(ItemEvent event) { Object source = event.getSource(); ItemSelectable ie = event.getItemSelectable(); if (source == interpChoice) { try {/*from w w w. ja va2s . c o m*/ if (ie.getSelectedObjects()[0] == "Spline") { linear = false; } if (ie.getSelectedObjects()[0] == "Linear") { linear = true; } startInterpolator(); } catch (Exception e) { System.err.println("Exception " + e); } } }
From source file:Statement.Statement.java
private void cbShopIDItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbShopIDItemStateChanged cbShopID = (JComboBox) evt.getSource(); code = "" + evt.getItem(); if (evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) { loadRevenue();/*ww w. j ava2 s . co m*/ loadExpense(); } else if (evt.getStateChange() == java.awt.event.ItemEvent.DESELECTED) { evaluator.list.clear(); } }
From source file:modnlp.capte.AlignmentInterfaceWS.java
public void itemStateChanged(ItemEvent e) { if (e.getSource() == splitButton) { if (e.getStateChange() == ItemEvent.DESELECTED) { doSplit = false;/*from w w w . j av a2 s . co m*/ System.out.println("Sentence splitting disabled"); } else { doSplit = true; System.out.println("Sentence splitting enabled"); } } else if (e.getSource() == convLine) { if (e.getStateChange() == ItemEvent.DESELECTED) { lineConvert = false; System.out.println("No line ending conversion"); } else { lineConvert = true; System.out.println("line ending conversion enabled"); } } }
From source file:org.jajuk.ui.views.ParameterViewGUIHelper.java
@Override public void itemStateChanged(final ItemEvent e) { if (e.getSource() == pv.jrbFile) { // jrbFile has been selected or // deselected pv.sbSearch.setEnabled(pv.jrbFile.isSelected()); }/*from ww w.j av a 2 s .com*/ }
From source file:com.kenai.redminenb.query.RedmineQueryController.java
@Override public void itemStateChanged(ItemEvent e) { if (e.getSource() == queryPanel.filterComboBox) { onFilterChange((Filter) e.getItem()); }/*from w ww. j a v a2 s .c o m*/ }
From source file:org.executequery.gui.ExecuteProcedurePanel.java
/** * Invoked when an item has been selected or deselected by the user. * The code written for this method performs the operations * that need to occur when an item is selected (or deselected). *///from ww w . j a va2 s.co m public void itemStateChanged(ItemEvent e) { // interested in selections only if (e.getStateChange() == ItemEvent.DESELECTED) { return; } final Object source = e.getSource(); GUIUtils.startWorker(new Runnable() { public void run() { try { setInProcess(true); reloadProcedureList(source); } finally { setInProcess(false); } } }); }
From source file:nz.govt.natlib.ndha.manualdeposit.StructMapFileDescManagement.java
private void initComponents() { scrlDescription = new javax.swing.JScrollPane(); lstDescription = new javax.swing.JList(); pnlDetails = new javax.swing.JPanel(); btnMoveUp = new javax.swing.JButton(); btnMoveDown = new javax.swing.JButton(); btnAddNew = new javax.swing.JButton(); btnDelete = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); btnClose = new javax.swing.JButton(); btnGenMainDesc = new javax.swing.JButton(); setTitle("Manage Structure Map File Descriptions"); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt);//from w ww. j a v a 2 s. c om } public void windowClosing(java.awt.event.WindowEvent evt) { dialogWindowClosing(evt); } }); scrlDescription.setViewportView(lstDescription); JPanel panelLayer1 = new JPanel(); panelLayer1.setAlignmentY(Component.TOP_ALIGNMENT); panel_ExtraLayers = new JPanel(); panel_ExtraLayers.setAlignmentY(Component.TOP_ALIGNMENT); panel_ExtraLayers.setMinimumSize(new Dimension(300, 0)); panel_ExtraLayers.setPreferredSize(new Dimension(300, 500)); panel_ExtraLayers.setMaximumSize(new Dimension(300, 500)); panel_ExtraLayers.setVisible(false); JLabel lblDescriptionL2 = new JLabel("Layer 2"); lblDescriptionL2.setFont(new Font("Tahoma", Font.PLAIN, 11)); JLabel lblDescription_1 = new JLabel("Description"); textfldDescriptionL2 = new JTextField(); textfldDescriptionL2.setName("DescriptionL2"); textfldDescriptionL2.setColumns(10); JLabel lblFilePrefixL2 = new JLabel("File Prefix/Suffix"); textfldFilePrefixL2 = new JTextField(); textfldFilePrefixL2.setName("FilePrefixL2"); textfldFilePrefixL2.setColumns(10); JLabel lblAllowMultiplesL2 = new JLabel("Allow Multiples?"); checkAllowMultiplesL2 = new JCheckBox(""); checkAllowMultiplesL2.setName("AllowMultiplesL2"); JLabel lblDescriptionL3 = new JLabel("Layer 3"); lblDescriptionL3.setFont(new Font("Tahoma", Font.PLAIN, 11)); JLabel lblDescription_2 = new JLabel("Description"); textfldDescriptionL3 = new JTextField(); textfldDescriptionL3.setName("DescriptionL3"); textfldDescriptionL3.setColumns(10); JLabel lblFilePrefixL3 = new JLabel("File Prefix/Suffix"); textfldFilePrefixL3 = new JTextField(); textfldFilePrefixL3.setName("FilePrefixL3"); textfldFilePrefixL3.setColumns(10); JLabel lblAllowMultiplesL3 = new JLabel("Allow Multiples?"); checkAllowMultiplesL3 = new JCheckBox(""); checkAllowMultiplesL3.setName("AllowMultiplesL3"); JLabel lblDescriptionL4 = new JLabel("Layer 4"); lblDescriptionL4.setFont(new Font("Tahoma", Font.PLAIN, 11)); JLabel lblDescription_3 = new JLabel("Description"); textfldDescriptionL4 = new JTextField(); textfldDescriptionL4.setName("DescriptionL4"); textfldDescriptionL4.setColumns(10); lblFilePrefixL4 = new JLabel("File Prefix/Suffix"); textfldFilePrefixL4 = new JTextField(); textfldFilePrefixL4.setName("FilePrefixL4"); textfldFilePrefixL4.setColumns(10); lblAllowMultiplesL4 = new JLabel("Allow Multiples?"); checkAllowMultiplesL4 = new JCheckBox(""); checkAllowMultiplesL4.setName("AllowMultiplesL4"); GroupLayout gl_panel_ExtraLayers = new GroupLayout(panel_ExtraLayers); gl_panel_ExtraLayers .setHorizontalGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_ExtraLayers.createSequentialGroup().addContainerGap() .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING) .addComponent(lblDescriptionL2) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addComponent(lblDescription_1).addGap(44) .addComponent(textfldDescriptionL2, GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addComponent(lblFilePrefixL2).addGap(18) .addComponent(textfldFilePrefixL2, GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE)) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addComponent(lblAllowMultiplesL2).addGap(18) .addComponent(checkAllowMultiplesL2)) .addComponent(lblDescriptionL3) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addGroup(gl_panel_ExtraLayers .createParallelGroup(Alignment.LEADING) .addComponent(lblDescription_2) .addComponent(lblFilePrefixL3) .addComponent(lblAllowMultiplesL3)) .addGroup(gl_panel_ExtraLayers .createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addGap(21) .addGroup(gl_panel_ExtraLayers .createParallelGroup(Alignment.LEADING) .addComponent(textfldFilePrefixL3, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE) .addComponent( textfldDescriptionL3, GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE))) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addGap(18) .addGroup(gl_panel_ExtraLayers .createParallelGroup(Alignment.LEADING) .addComponent(textfldDescriptionL4, GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE) .addGroup(gl_panel_ExtraLayers .createSequentialGroup() .addComponent(checkAllowMultiplesL3) .addPreferredGap( ComponentPlacement.RELATED, 172, Short.MAX_VALUE)))))) .addComponent(lblDescriptionL4).addComponent(lblDescription_3) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addComponent(lblFilePrefixL4).addGap(18) .addComponent(textfldFilePrefixL4, GroupLayout.PREFERRED_SIZE, 54, GroupLayout.PREFERRED_SIZE)) .addGroup(gl_panel_ExtraLayers.createSequentialGroup() .addComponent(lblAllowMultiplesL4).addGap(18) .addComponent(checkAllowMultiplesL4))) .addContainerGap())); gl_panel_ExtraLayers.setVerticalGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_ExtraLayers.createSequentialGroup().addContainerGap() .addComponent(lblDescriptionL2).addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblDescription_1) .addComponent(textfldDescriptionL2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblFilePrefixL2) .addComponent(textfldFilePrefixL2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblAllowMultiplesL2).addComponent(checkAllowMultiplesL2)) .addGap(18).addComponent(lblDescriptionL3).addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblDescription_2) .addComponent(textfldDescriptionL3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblFilePrefixL3) .addComponent(textfldFilePrefixL3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.LEADING) .addComponent(lblAllowMultiplesL3).addComponent(checkAllowMultiplesL3)) .addGap(18).addComponent(lblDescriptionL4).addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblDescription_3) .addComponent(textfldDescriptionL4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblFilePrefixL4) .addComponent(textfldFilePrefixL4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panel_ExtraLayers.createParallelGroup(Alignment.BASELINE) .addComponent(lblAllowMultiplesL4).addComponent(checkAllowMultiplesL4)) .addContainerGap(39, Short.MAX_VALUE))); panel_ExtraLayers.setLayout(gl_panel_ExtraLayers); lblDescription = new JLabel(); lblDescription.setText("Description"); textfldDescription = new JTextField(); textfldDescription.setName("Description"); textfldFilePrefix = new JTextField(); textfldFilePrefix.setName("FilePrefix"); lblFilePrefix = new JLabel(); lblFilePrefix.setText("File Prefix/Suffix"); lblPosition = new JLabel(); lblPosition.setText("Position"); cmbPosition = new JComboBox(); cmbPosition.setName("Position"); lblMandatory = new JLabel(); lblMandatory.setText("Mandatory?"); checkMandatory = new JCheckBox(); checkMandatory.setName("Mandatory"); lblAllowMultiples = new JLabel(); lblAllowMultiples.setText("Allow Multiples?"); checkAllowMultiples = new JCheckBox(); checkAllowMultiples.setName("AllowMultiples"); lblExtraLayers = new JLabel("Extra Layers?"); checkExtraLayers = new JCheckBox(""); checkExtraLayers.setName("ExtraLayers"); checkExtraLayers.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { JCheckBox button = (JCheckBox) e.getSource(); if (button.isSelected()) { panel_MainDesc.setVisible(true); panel_ExtraLayers.setVisible(true); pnlDetails.revalidate(); pnlDetails.repaint(); } else { panel_MainDesc.setVisible(false); panel_ExtraLayers.setVisible(false); pnlDetails.revalidate(); pnlDetails.repaint(); } } }); GroupLayout gl_panelLayer1 = new GroupLayout(panelLayer1); gl_panelLayer1.setHorizontalGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addGroup(gl_panelLayer1.createSequentialGroup().addContainerGap() .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addGroup(gl_panelLayer1.createSequentialGroup() .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addComponent(lblFilePrefix).addComponent(lblDescription) .addComponent(lblPosition)) .addGap(18) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addComponent(textfldFilePrefix, GroupLayout.PREFERRED_SIZE, 51, GroupLayout.PREFERRED_SIZE) .addComponent(textfldDescription, GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE) .addComponent(cmbPosition, 0, 169, Short.MAX_VALUE))) .addGroup( gl_panelLayer1.createSequentialGroup() .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addComponent(lblAllowMultiples) .addComponent(lblExtraLayers).addComponent(lblMandatory)) .addGap(18) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addComponent(checkExtraLayers).addComponent(checkMandatory) .addComponent(checkAllowMultiples)))) .addContainerGap())); gl_panelLayer1 .setVerticalGroup(gl_panelLayer1.createParallelGroup(Alignment.TRAILING).addGroup(Alignment.LEADING, gl_panelLayer1.createSequentialGroup().addGap(24) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.BASELINE) .addComponent(lblDescription) .addComponent(textfldDescription, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panelLayer1 .createParallelGroup(Alignment.BASELINE).addComponent(lblFilePrefix) .addComponent(textfldFilePrefix, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.BASELINE) .addComponent(lblPosition) .addComponent(cmbPosition, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(8) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addComponent(checkMandatory).addComponent(lblMandatory)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.LEADING) .addComponent(checkAllowMultiples).addComponent(lblAllowMultiples)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(gl_panelLayer1.createParallelGroup(Alignment.BASELINE) .addComponent(lblExtraLayers).addComponent(checkExtraLayers)) .addContainerGap(26, Short.MAX_VALUE))); panelLayer1.setLayout(gl_panelLayer1); btnMoveUp.setPreferredSize(new java.awt.Dimension(91, 23)); btnMoveUp.setText("Move Up"); btnMoveDown.setText("Move Down"); btnAddNew.setText("Add New"); btnDelete.setText("Delete"); btnSave.setText("Save"); btnCancel.setText("Cancel"); btnClose.setText("Close"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.TRAILING).addGroup(layout.createSequentialGroup() .addComponent(scrlDescription, GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE).addGap(18) .addGroup(layout.createParallelGroup(Alignment.TRAILING) .addGroup(layout.createSequentialGroup().addComponent(btnAddNew).addGap(18) .addComponent(btnDelete, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE) .addGap(19)) .addComponent(pnlDetails, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addComponent(btnMoveUp, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnMoveDown, GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE).addGap(89) .addComponent(btnSave, GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(btnCancel, GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(btnClose, GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup() .addComponent(pnlDetails, GroupLayout.PREFERRED_SIZE, 597, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(btnDelete) .addComponent(btnAddNew))) .addComponent(scrlDescription, GroupLayout.DEFAULT_SIZE, 387, Short.MAX_VALUE)) .addGap(18) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(btnMoveUp, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(btnMoveDown)) .addGroup(layout.createParallelGroup(Alignment.BASELINE).addComponent(btnClose) .addComponent(btnCancel).addComponent(btnSave))) .addContainerGap())); pnlDetails.setLayout(new BoxLayout(pnlDetails, BoxLayout.Y_AXIS)); panel_MainDesc = new JPanel(); panel_MainDesc.setMinimumSize(new Dimension(300, 0)); panel_MainDesc.setPreferredSize(new Dimension(300, 60)); panel_MainDesc.setMaximumSize(new Dimension(300, 60)); panel_MainDesc.setVisible(false); lblDescriptionMain = new JLabel("Main Description"); textfldDescriptionMain = new JTextField(); textfldDescriptionMain.setName("DescriptionMain"); textfldDescriptionMain.setColumns(10); btnGenMainDesc_1 = new JButton(""); btnGenMainDesc_1.setToolTipText("Generate a main description by concatenating layer descriptions."); btnGenMainDesc_1.setContentAreaFilled(false); btnGenMainDesc_1.setIcon(new ImageIcon(StructMapFileDescManagement.class .getResource("/org/jdesktop/swingx/plaf/basic/resources/month-down.png"))); GroupLayout gl_panel_MainDesc = new GroupLayout(panel_MainDesc); gl_panel_MainDesc.setHorizontalGroup(gl_panel_MainDesc.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_MainDesc.createSequentialGroup().addContainerGap() .addComponent(lblDescriptionMain).addGap(18) .addComponent(textfldDescriptionMain, GroupLayout.PREFERRED_SIZE, 165, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(btnGenMainDesc_1, GroupLayout.PREFERRED_SIZE, 25, Short.MAX_VALUE) .addContainerGap())); gl_panel_MainDesc.setVerticalGroup(gl_panel_MainDesc.createParallelGroup(Alignment.LEADING) .addGroup(gl_panel_MainDesc.createSequentialGroup().addContainerGap().addGroup(gl_panel_MainDesc .createParallelGroup(Alignment.LEADING) .addComponent(btnGenMainDesc_1, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addGroup(gl_panel_MainDesc.createParallelGroup(Alignment.BASELINE) .addComponent(lblDescriptionMain).addComponent(textfldDescriptionMain, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); panel_MainDesc.setLayout(gl_panel_MainDesc); pnlDetails.add(panel_MainDesc); pnlDetails.add(panelLayer1); pnlDetails.add(panel_ExtraLayers); getContentPane().setLayout(layout); pack(); }
From source file:TextureByReference.java
public void itemStateChanged(ItemEvent e) { Object o = e.getSource(); // for the flip checkbox if (o == flipB) { if (e.getStateChange() == ItemEvent.DESELECTED) { animate.setFlipImages(false); } else/*from www .j a v a 2 s . c o m*/ animate.setFlipImages(true); } }