List of usage examples for java.lang Short MAX_VALUE
short MAX_VALUE
To view the source code for java.lang Short MAX_VALUE.
Click Source Link
From source file:marshalsec.Red5AMFBase.java
@Override @Primary//from w w w . java2 s. com @Args(minArgs = 1, args = { "jndiUrl" }, defaultArgs = { MarshallerBase.defaultJNDIUrl }) public Object makeJdbcRowSet(UtilFactory uf, String[] args) throws Exception { Map<String, Object> values = new LinkedHashMap<>(); int size = 16; // see makePropertyPathFactory for the gritty details for (; size < Short.MAX_VALUE; size = size << 1) { long d = mapHash("dataSourceName".hashCode() & 0xFFFFFFFFL) % size; long a = mapHash("autoCommit".hashCode() & 0xFFFFFFFFL) % size; if (d <= a) { System.err.println( String.format("dataSourceName @ %d autoCommit @ %d with table size %d", d, a, size)); break; } } values.put("dataSourceName", args[0]); values.put("autoCommit", true); for (int j = 0; j < size / 2; j++) { values.put("" + j, ""); } return new PropertyInjectingProxy(Reflections.createWithoutConstructor(JdbcRowSetImpl.class), values); }
From source file:UserInterface.CDC.VaccineStateDistributionJPanel.java
/** * 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./* w w w. j a va 2 s . c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); summaryjTable = new javax.swing.JTable(); viewDetailsjButton = new javax.swing.JButton(); viewChartjButton = new javax.swing.JButton(); jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Vaccine State Distribution"); summaryjTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "State", "Total Vaccines Distributed" }) { boolean[] canEdit = new boolean[] { false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); summaryjTable.getTableHeader().setReorderingAllowed(false); jScrollPane1.setViewportView(summaryjTable); viewDetailsjButton.setText("View Details >>"); viewDetailsjButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewDetailsjButtonActionPerformed(evt); } }); viewChartjButton.setText("View Chart"); viewChartjButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewChartjButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 658, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(viewChartjButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(viewDetailsjButton))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jLabel1).addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 356, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(viewDetailsjButton).addComponent(viewChartjButton)) .addContainerGap(103, Short.MAX_VALUE))); }
From source file:io.github.jeddict.relation.mapper.properties.index.IndexPanel.java
/** * This method is called from within the uniqueConstraint to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor.//from w w w. ja v a2 s . c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { rootLayeredPane = new javax.swing.JLayeredPane(); tableMemberPanel = new io.github.jeddict.relation.mapper.properties.tablemember.TableMemberPanel("Indexes"); configPane = new javax.swing.JLayeredPane(); action_jLayeredPane = new javax.swing.JLayeredPane(); save_Button = new javax.swing.JButton(); cancel_Button = new javax.swing.JButton(); nameTextField = new javax.swing.JTextField(); nameLabel = new javax.swing.JLabel(); uniqueCheckBox = new javax.swing.JCheckBox(); rootLayeredPane.setLayout(new java.awt.BorderLayout()); javax.swing.GroupLayout tableMemberPanelLayout = new javax.swing.GroupLayout(tableMemberPanel); tableMemberPanel.setLayout(tableMemberPanelLayout); tableMemberPanelLayout.setHorizontalGroup(tableMemberPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); tableMemberPanelLayout.setVerticalGroup(tableMemberPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 414, Short.MAX_VALUE)); rootLayeredPane.add(tableMemberPanel, java.awt.BorderLayout.CENTER); org.openide.awt.Mnemonics.setLocalizedText(save_Button, org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.save_Button.text")); // NOI18N save_Button.setToolTipText( org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.save_Button.toolTipText")); // NOI18N save_Button.setPreferredSize(new java.awt.Dimension(57, 29)); save_Button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { save_ButtonActionPerformed(evt); } }); action_jLayeredPane.add(save_Button); save_Button.setBounds(0, 0, 70, 30); org.openide.awt.Mnemonics.setLocalizedText(cancel_Button, org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.cancel_Button.text")); // NOI18N cancel_Button.setToolTipText( org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.cancel_Button.toolTipText")); // NOI18N cancel_Button.setPreferredSize(new java.awt.Dimension(60, 23)); cancel_Button.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancel_ButtonActionPerformed(evt); } }); action_jLayeredPane.add(cancel_Button); cancel_Button.setBounds(80, 0, 70, 30); nameTextField.setToolTipText( org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.nameTextField.toolTipText")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.name")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(uniqueCheckBox, org.openide.util.NbBundle.getMessage(IndexPanel.class, "IndexPanel.uniqueCheckBox.text")); // NOI18N configPane.setLayer(action_jLayeredPane, javax.swing.JLayeredPane.DEFAULT_LAYER); configPane.setLayer(nameTextField, javax.swing.JLayeredPane.DEFAULT_LAYER); configPane.setLayer(nameLabel, javax.swing.JLayeredPane.DEFAULT_LAYER); configPane.setLayer(uniqueCheckBox, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout configPaneLayout = new javax.swing.GroupLayout(configPane); configPane.setLayout(configPaneLayout); configPaneLayout.setHorizontalGroup(configPaneLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(configPaneLayout.createSequentialGroup().addContainerGap().addComponent(nameLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(configPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(configPaneLayout.createSequentialGroup() .addComponent(uniqueCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 113, Short.MAX_VALUE) .addComponent(action_jLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(configPaneLayout.createSequentialGroup().addComponent(nameTextField) .addContainerGap())))); configPaneLayout.setVerticalGroup(configPaneLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, configPaneLayout.createSequentialGroup() .addGap(5, 5, 5) .addGroup(configPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(nameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(configPaneLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(uniqueCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(action_jLayeredPane, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))); rootLayeredPane.add(configPane, java.awt.BorderLayout.SOUTH); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rootLayeredPane, javax.swing.GroupLayout.Alignment.TRAILING)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(rootLayeredPane, javax.swing.GroupLayout.Alignment.TRAILING)); }
From source file:TextAreaDemo.java
private void initComponents() { jLabel1 = new JLabel("Try typing 'spectacular' or 'Swing'..."); textArea = new JTextArea(); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); textArea.setColumns(20);/*from www . j a v a 2 s .c o m*/ textArea.setLineWrap(true); textArea.setRows(5); textArea.setWrapStyleWord(true); jScrollPane1 = new JScrollPane(textArea); GroupLayout layout = new GroupLayout(getContentPane()); getContentPane().setLayout(layout); // Create a parallel group for the horizontal axis ParallelGroup hGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING); // Create a sequential and a parallel groups SequentialGroup h1 = layout.createSequentialGroup(); ParallelGroup h2 = layout.createParallelGroup(GroupLayout.Alignment.TRAILING); // Add a scroll panel and a label to the parallel group h2 h2.addComponent(jScrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE); h2.addComponent(jLabel1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE); // Add a container gap to the sequential group h1 h1.addContainerGap(); // Add the group h2 to the group h1 h1.addGroup(h2); h1.addContainerGap(); // Add the group h1 to hGroup hGroup.addGroup(Alignment.TRAILING, h1); // Create the horizontal group layout.setHorizontalGroup(hGroup); // Create a parallel group for the vertical axis ParallelGroup vGroup = layout.createParallelGroup(GroupLayout.Alignment.LEADING); // Create a sequential group SequentialGroup v1 = layout.createSequentialGroup(); // Add a container gap to the sequential group v1 v1.addContainerGap(); // Add a label to the sequential group v1 v1.addComponent(jLabel1); v1.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED); // Add scroll panel to the sequential group v1 v1.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE); v1.addContainerGap(); // Add the group v1 to vGroup vGroup.addGroup(v1); // Create the vertical group layout.setVerticalGroup(vGroup); pack(); }
From source file:au.org.ala.delta.intkey.ui.AddOrEditDataIndexItemDialog.java
private void init() { ActionMap actionMap = Application.getInstance().getContext().getActionMap(this); ResourceMap resourceMap = Application.getInstance().getContext() .getResourceMap(AddOrEditDataIndexItemDialog.class); resourceMap.injectFields(this); _pnlMain = new JPanel(); getContentPane().add(_pnlMain, BorderLayout.CENTER); _lblDescription = new JLabel(descriptionCaption); _txtFldDescription = new JTextField(); _txtFldDescription.setColumns(10);/*from www . j a v a 2 s .c o m*/ _btnBrowse = new JButton(); _btnBrowse.setAction(actionMap.get("AddOrEditDataIndexItemDialog_Browse")); _lblFilePath = new JLabel(pathCaption); _txtFldFilePath = new JTextField(); _txtFldFilePath.setColumns(10); GroupLayout gl__pnlMain = new GroupLayout(_pnlMain); gl__pnlMain.setHorizontalGroup(gl__pnlMain.createParallelGroup(Alignment.LEADING).addGroup(gl__pnlMain .createSequentialGroup().addContainerGap() .addGroup(gl__pnlMain.createParallelGroup(Alignment.LEADING, false) .addComponent(_lblFilePath, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_lblDescription, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl__pnlMain.createParallelGroup(Alignment.TRAILING) .addGroup(gl__pnlMain.createSequentialGroup() .addComponent(_txtFldFilePath, GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(_btnBrowse)) .addComponent(_txtFldDescription, GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)) .addContainerGap())); gl__pnlMain.setVerticalGroup(gl__pnlMain.createParallelGroup(Alignment.LEADING) .addGroup(gl__pnlMain.createSequentialGroup().addContainerGap() .addGroup(gl__pnlMain.createParallelGroup(Alignment.BASELINE).addComponent(_lblDescription) .addComponent(_txtFldDescription, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(18) .addGroup(gl__pnlMain.createParallelGroup(Alignment.BASELINE) .addComponent(_btnBrowse, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addComponent(_txtFldFilePath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(_lblFilePath, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)) .addContainerGap(25, Short.MAX_VALUE))); _pnlMain.setLayout(gl__pnlMain); _pnlButtons = new JPanel(); getContentPane().add(_pnlButtons, BorderLayout.SOUTH); _btnOk = new JButton(); _btnOk.setAction(actionMap.get("AddOrEditDataIndexItemDialog_OK")); _pnlButtons.add(_btnOk); _btnCancel = new JButton(); _btnCancel.setAction(actionMap.get("AddOrEditDataIndexItemDialog_Cancel")); _pnlButtons.add(_btnCancel); }
From source file:br.com.utfpr.pb.view.RelatorioPedidosView.java
/** * 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./*from w w w .j a v a 2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jButtonFechar = new javax.swing.JButton(); jButtonGerar = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); pessoa = new javax.swing.JComboBox<>(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); dataIni = new org.jdesktop.swingx.JXDatePicker(); dataFim = new org.jdesktop.swingx.JXDatePicker(); setClosable(true); setIconifiable(true); setMaximizable(true); setTitle("Relatrio de Pedidos"); jButtonFechar.setText("Fechar"); jButtonFechar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonFecharActionPerformed(evt); } }); jButtonGerar.setText("Gerar"); jButtonGerar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonGerarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jButtonGerar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonFechar).addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonFechar).addComponent(jButtonGerar)) .addContainerGap())); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Filtros")); jLabel1.setText("Pessoa *"); pessoa.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jLabel2.setText("Data inicial *"); jLabel3.setText("Data final *"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3).addComponent(jLabel2).addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(pessoa, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 263, Short.MAX_VALUE))) .addContainerGap())); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(pessoa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(dataIni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3).addComponent(dataFim, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(59, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addContainerGap().addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); pack(); }
From source file:gg.view.overview.IncomeExpensesTopComponent.java
/** This method is called from within the constructor to * initialize the form.//from w w w . ja va2s . co m * 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() { jPanelIncomeExpenses = new javax.swing.JPanel(); jPanelIncomeExpenses.setLayout(new java.awt.BorderLayout()); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout .createSequentialGroup().addContainerGap().addComponent(jPanelIncomeExpenses, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE) .addContainerGap())); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(jPanelIncomeExpenses, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE) .addContainerGap())); }
From source file:com.dvd.ui.UpdateInventory.java
/** * 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.// w w w .j a va 2 s .c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); label1 = new java.awt.Label(); jLabel1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); addDVDCopy = new javax.swing.JButton(); viewBooking = new javax.swing.JButton(); updateDVDCopy = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setBackground(new java.awt.Color(106, 161, 172)); setResizable(false); jPanel1.setBackground(new java.awt.Color(23, 193, 111)); jPanel1.setForeground(new java.awt.Color(254, 238, 238)); label1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); label1.setFont(new java.awt.Font("Ubuntu Medium", 0, 48)); // NOI18N label1.setForeground(new java.awt.Color(254, 254, 254)); label1.setText("DVD Shop"); jLabel1.setFont(new java.awt.Font("Ubuntu Medium", 0, 24)); // NOI18N jLabel1.setForeground(new java.awt.Color(254, 254, 254)); jLabel1.setText("Update Inventory"); jPanel2.setBackground(new java.awt.Color(23, 193, 111)); addDVDCopy.setText("Add DVD Copy"); addDVDCopy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addDVDCopyActionPerformed(evt); } }); viewBooking.setText("View Booking"); viewBooking.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { viewBookingActionPerformed(evt); } }); updateDVDCopy.setText("Update DVD Copy"); updateDVDCopy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { updateDVDCopyActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout .setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout.createSequentialGroup().addContainerGap() .addComponent(addDVDCopy, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(updateDVDCopy, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(viewBooking, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(addDVDCopy, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(viewBooking, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(updateDVDCopy, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/resources/pic8.jpg"))); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(23, Short.MAX_VALUE) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(21, 21, 21)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addComponent(jLabel2).addGap(47, 47, 47)))) .addGroup(jPanel1Layout.createSequentialGroup().addGap(166, 166, 166).addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup().addGap(18, 18, 18).addComponent(jLabel1))) .addGap(0, 0, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1).addGap(8, 8, 8) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel2) .addGap(516, 516, 516))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 504, Short.MAX_VALUE) .addContainerGap())); pack(); }
From source file:eremeykin.pete.plotter.CartesianPlotterTopComponent.java
/** * 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./*w w w .jav a 2 s . c o m*/ */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 400, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 300, Short.MAX_VALUE)); }
From source file:libra.common.hadoop.io.datatypes.CompressedIntArrayWritable.java
private byte makeFlag(int count, int[] arr) throws IOException { byte flag = 0; // size//from w ww . j a va 2s .co m if (count <= Byte.MAX_VALUE) { flag = 0x00; } else if (count <= Short.MAX_VALUE) { flag = 0x01; } else if (count <= Integer.MAX_VALUE) { flag = 0x02; } else { throw new IOException("Array size overflow"); } // datatype int max = 0; for (int i = 0; i < arr.length; i++) { max = Math.max(max, Math.abs(arr[i])); } if (max <= Byte.MAX_VALUE) { flag |= 0x00; } else if (max <= Short.MAX_VALUE) { flag |= 0x10; } else if (max <= Integer.MAX_VALUE) { flag |= 0x20; } else { throw new IOException("MaxValue overflow"); } return flag; }