List of usage examples for javax.swing SwingConstants CENTER
int CENTER
To view the source code for javax.swing SwingConstants CENTER.
Click Source Link
From source file:ro.nextreports.engine.exporter.ResultExporter.java
private void buildCellHAllign(Map<String, Object> format, int hAllign) { if (SwingConstants.CENTER == hAllign) { format.put(StyleFormatConstants.HORIZONTAL_ALIGN_KEY, StyleFormatConstants.HORIZONTAL_ALIGN_CENTER); }// w w w . j a va 2s. c om if (SwingConstants.LEFT == hAllign) { format.put(StyleFormatConstants.HORIZONTAL_ALIGN_KEY, StyleFormatConstants.HORIZONTAL_ALIGN_LEFT); } if (SwingConstants.RIGHT == hAllign) { format.put(StyleFormatConstants.HORIZONTAL_ALIGN_KEY, StyleFormatConstants.HORIZONTAL_ALIGN_RIGHT); } }
From source file:ro.nextreports.engine.exporter.ResultExporter.java
private void buildCellVAllign(Map<String, Object> format, int vAllign) { if (SwingConstants.CENTER == vAllign) { format.put(StyleFormatConstants.VERTICAL_ALIGN_KEY, StyleFormatConstants.VERTICAL_ALIGN_MIDDLE); }//from w w w .j av a 2 s. c o m if (SwingConstants.TOP == vAllign) { format.put(StyleFormatConstants.VERTICAL_ALIGN_KEY, StyleFormatConstants.VERTICAL_ALIGN_TOP); } if (SwingConstants.BOTTOM == vAllign) { format.put(StyleFormatConstants.VERTICAL_ALIGN_KEY, StyleFormatConstants.VERTICAL_ALIGN_BOTTOM); } }
From source file:savant.amino.AminoPlugin.java
/** * Create the user-interface which appears within the panel. * * @param panel provided by Savant//from w w w.j a va2 s. c o m */ @Override public void init(JPanel panel) { panel.setLayout(new GridLayout(5, 4, 2, 2)); // Create a label for each amino-acid. For now, these are just for reference, // but we might make them into buttons to change the colour scheme. for (AminoAcid a : AminoAcid.values()) { JLabel label = new JLabel(a.name, SwingConstants.CENTER); label.setOpaque(true); label.setBackground(a.color); label.setForeground(a == AminoAcid.STOP ? Color.WHITE : Color.BLACK); panel.add(label); } // First time through, create canvasses for any existing gene tracks. We // hook this onto a listener so that we'll know that Savant has fully loaded // the plugin before we try to do anything. PluginUtils.addPluginListener(new Listener<PluginEvent>() { @Override public void handleEvent(PluginEvent event) { if (event.getType() == PluginEvent.Type.LOADED && event.getPlugin() instanceof AminoPlugin) { PluginUtils.removePluginListener(this); TrackAdapter[] existingTracks = TrackUtils.getTracks(DataFormat.RICH_INTERVAL); for (TrackAdapter t : existingTracks) { createCanvas(t); } } } }); TrackUtils.addTrackListener(new Listener<TrackEvent>() { @Override public void handleEvent(TrackEvent event) { if (event.getType() == TrackEvent.Type.ADDED) { createCanvas(event.getTrack()); } } }); NavigationUtils.addLocationChangedListener(new Listener<LocationChangedEvent>() { @Override public void handleEvent(LocationChangedEvent event) { for (TrackAdapter t : TrackUtils.getTracks()) { if (t.getDataFormat() == DataFormat.RICH_INTERVAL) { t.getLayerCanvas(AminoPlugin.this).repaint(); } } } }); }
From source file:savant.plugin.ToolSettingsPanel.java
ToolSettingsPanel(Tool t) { tool = t;//from w w w . j av a2 s . c o m setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.weightx = 1.0; gbc.gridwidth = GridBagConstraints.REMAINDER; gbc.gridy = 0; try { tool.parseDescriptor(); commandLine = new JLabel("", SwingConstants.CENTER); commandLine.setFont(new Font("Serif", Font.PLAIN, 14)); commandLine.setBorder( BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), BorderFactory.createEmptyBorder(5, 5, 5, 5))); gbc.insets = new Insets(10, 10, 10, 10); gbc.fill = GridBagConstraints.HORIZONTAL; add(commandLine, gbc); JButton executeButton = new JButton("Execute"); executeButton.addActionListener(executeListener); gbc.insets = new Insets(5, 5, 5, 5); gbc.gridy = 1; gbc.fill = GridBagConstraints.NONE; add(executeButton, gbc); for (ToolArgument a : tool.arguments) { addArgumentToPanel(a, ++gbc.gridy); } gbc.gridx = 0; gbc.gridy++; gbc.weighty = 1.0; gbc.fill = GridBagConstraints.BOTH; add(new JPanel(), gbc); tool.displayCommandLine(commandLine); } catch (Exception x) { Tool.LOG.info(String.format("Unable to load %s.", tool.getDescriptor().getFile()), x); add(new JLabel(String.format("<html>Unable to load <i>%s</i><br>%s</html>", tool.getDescriptor().getFile(), x)), gbc); } }
From source file:savant.view.swing.Ruler.java
public Ruler() { this.mousePosition = new JLabel(); this.mousePosition.setHorizontalAlignment(SwingConstants.CENTER); this.add(this.mousePosition, BorderLayout.CENTER); this.recStart = new JLabel(); this.add(this.recStart, BorderLayout.WEST); this.recStop = new JLabel(); this.add(this.recStop, BorderLayout.EAST); this.cords = new JLabel(); this.add(this.cords, BorderLayout.NORTH); graphPaneController.addListener(new Listener<GraphPaneEvent>() { @Override/*from w w w. j av a 2s. c o m*/ public void handleEvent(GraphPaneEvent event) { if (graphPaneController.isPanning()) { repaint(); } } }); locationController.addListener(new Listener<LocationChangedEvent>() { @Override public void handleEvent(LocationChangedEvent event) { repaint(); } }); }
From source file:shuffle.fwk.service.roster.EditRosterService.java
private JPanel createRosterComponent(Species s) { JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.gridx = 1;//from www .j a v a 2s.c o m c.gridy = 1; c.anchor = GridBagConstraints.CENTER; MouseAdapter ma = new PressOrClickMouseAdapter() { @Override protected void onRight(MouseEvent e) { onLeft(e); } @Override protected void onLeft(MouseEvent e) { setSelected(s, ret); selectedDisplayLabel.repaint(); } @Override protected void onEnter() { // Do nothing } }; SpeciesPaint sp = new SpeciesPaint(s, false, getMegaFilter()); ImageIcon icon = getUser().getImageManager().getImageFor(sp); JLabel iconLabel = new JLabel(icon); iconLabel.addMouseListener(ma); ret.add(iconLabel, c); c.gridy += 1; JLabel jLabel = new JLabel(s.getLocalizedName(getMegaFilter())); jLabel.setHorizontalTextPosition(SwingConstants.CENTER); jLabel.setHorizontalAlignment(SwingConstants.CENTER); jLabel.addMouseListener(ma); ret.add(jLabel, c); JComboBox<Integer> level = new JComboBox<Integer>(); for (int i = 0; i <= Species.MAX_LEVEL; i++) { level.addItem(i); } Integer thisLevel = getLevelFor(s); level.setSelectedItem(thisLevel); level.setToolTipText(getString(KEY_POKEMON_LEVEL_TOOLTIP)); c.gridy += 1; // put the level selector below the icon. ret.add(level, c); level.addItemListener(new ItemListener() { @Override public void itemStateChanged(ItemEvent e) { int index = level.getSelectedIndex(); myData.setLevelForSpecies(s, index); rebuildSelectedLabel(); } }); return ret; }
From source file:shuffle.fwk.service.teams.EditTeamService.java
private JPanel createRosterComponent(Species s) { JPanel ret = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1;//from w w w .jav a 2s . c o m c.gridy = 1; c.anchor = GridBagConstraints.CENTER; MouseAdapter ma = new PressOrClickMouseAdapter() { @Override protected void onRight(MouseEvent e) { onLeft(e); } @Override protected void onLeft(MouseEvent e) { setSelected(s, ret); selectedDisplayLabel.repaint(); } @Override protected void onEnter() { // Do nothing } }; SpeciesPaint sp = new SpeciesPaint(s, false, getMegaFilter()); ImageIcon icon = getUser().getImageManager().getImageFor(sp); JLabel iconLabel = new JLabel(icon); iconLabel.addMouseListener(ma); ret.add(iconLabel, c); c.gridy += 1; JLabel jLabel = new JLabel(s.getLocalizedName(getMegaFilter())); jLabel.setHorizontalTextPosition(SwingConstants.CENTER); jLabel.setHorizontalAlignment(SwingConstants.CENTER); jLabel.addMouseListener(ma); ret.add(jLabel, c); JButton addToTeam = new JButton(getString(KEY_ADD)); addToTeam.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { addSpeciesToTeam(s); updateTeamPanel(); } }); addToTeam.setToolTipText(getString(KEY_ADD_TOOLTIP)); c.gridy += 1; ret.add(addToTeam, c); return ret; }
From source file:Store.HealthSMS.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 ww .j a v a 2s . c om */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); jButton2 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); txt_msg = new javax.swing.JTextArea(); jLabel2 = new javax.swing.JLabel(); Send = new javax.swing.JButton(); clr = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); spno = new javax.swing.JTextField(); txt_no = new javax.swing.JTextField(); src_btn = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); hdate = new javax.swing.JMenu(); htime = new javax.swing.JMenu(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("SEND SMS TO PATIENTS"); setBackground(new java.awt.Color(0, 153, 51)); setFont(new java.awt.Font("Agency FB", 1, 10)); // NOI18N setResizable(false); jToolBar1.setRollover(true); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/lightbox-prev.png"))); // NOI18N jButton2.setToolTipText("Back"); jButton2.setFocusable(false); jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jToolBar1.add(jButton2); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jButton1.setToolTipText("Log Out"); jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); txt_msg.setColumns(20); txt_msg.setRows(5); txt_msg.setText("Type The Message..."); txt_msg.setToolTipText("Type The Message..."); txt_msg.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txt_msgMouseClicked(evt); } }); jScrollPane1.setViewportView(txt_msg); jLabel2.setText("Message"); Send.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/messages-icon2.png"))); // NOI18N Send.setText("Send"); Send.setToolTipText("Send SMS to Patients"); Send.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SendActionPerformed(evt); } }); clr.setText("Clear"); clr.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clrActionPerformed(evt); } }); jLabel1.setText("Phone Number"); spno.setEditable(false); spno.setToolTipText("Enter The Phone Number,start +254..."); spno.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { spnoMouseClicked(evt); } }); spno.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { spnoKeyTyped(evt); } }); txt_no.setText("Enter Patient's Admittion Number to Search"); src_btn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/search-icon.png"))); // NOI18N src_btn.setText("Search"); src_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { src_btnActionPerformed(evt); } }); jMenu1.setText("File"); jMenu1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenu1ActionPerformed(evt); } }); jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jMenuItem1.setText("Log Out"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuBar1.add(jMenu1); hdate.setText("Date"); jMenuBar1.add(hdate); htime.setText("Time"); jMenuBar1.add(htime); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout.createSequentialGroup().addGap(115, 115, 115).addComponent(jLabel1)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 497, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup().addGap(35, 35, 35).addComponent( jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txt_no, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(spno, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)) .addGap(30, 30, 30).addComponent(src_btn)))) .addGroup(layout.createSequentialGroup().addGap(272, 272, 272).addComponent(Send) .addGap(43, 43, 43).addComponent(clr))) .addContainerGap(154, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(src_btn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txt_no, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(spno, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clr, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Send))) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18))); setSize(new java.awt.Dimension(870, 630)); setLocationRelativeTo(null); }
From source file:Store.SendToDocs.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 ava2 s. c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); d_no = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); d_txt = new javax.swing.JTextArea(); dsend = new javax.swing.JButton(); dclr = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); txt_dssrc = new javax.swing.JTextField(); dsrc = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); sdate = new javax.swing.JMenu(); stime = new javax.swing.JMenu(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); jToolBar1.setRollover(true); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/lightbox-prev.png"))); // NOI18N jButton1.setToolTipText("Back"); jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jButton2.setToolTipText("LOg Out"); jButton2.setFocusable(false); jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jToolBar1.add(jButton2); jLabel1.setText("Message"); d_no.setEditable(false); d_no.setToolTipText("Enter Phone Number,Start +254..."); d_no.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { d_noMouseClicked(evt); } }); d_no.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { d_noKeyTyped(evt); } }); d_txt.setColumns(20); d_txt.setRows(5); d_txt.setText("Type Your Message..."); d_txt.setToolTipText("Enter Phone Number,Start +254.."); d_txt.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { d_txtMouseClicked(evt); } }); jScrollPane1.setViewportView(d_txt); dsend.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/messages-icon2.png"))); // NOI18N dsend.setText("Send"); dsend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dsendActionPerformed(evt); } }); dclr.setText("Clear"); dclr.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dclrActionPerformed(evt); } }); jLabel2.setText("Phone Number"); txt_dssrc.setText("Enter Doctor's Number To Search"); dsrc.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/search-icon.png"))); // NOI18N dsrc.setText("Search"); dsrc.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dsrcActionPerformed(evt); } }); jMenu1.setText("File"); jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jMenuItem1.setText("Log Out"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuBar1.add(jMenu1); sdate.setText("Date"); jMenuBar1.add(sdate); stime.setText("Time"); jMenuBar1.add(stime); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(195, 195, 195) .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(325, 325, 325).addComponent(dsend) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(dclr)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(135, 135, 135) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addComponent(jLabel2).addGap(32, 32, 32))) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txt_dssrc, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(d_no, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)) .addGap(40, 40, 40).addComponent(dsrc)) .addComponent(jScrollPane1)))) .addContainerGap(186, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(dsrc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txt_dssrc)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(d_no, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(27, 27, 27) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(dsend).addComponent(dclr)) .addGap(69, 69, 69))); setSize(new java.awt.Dimension(829, 535)); setLocationRelativeTo(null); }
From source file:ueg.watchdog.view.Report.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 .ja v a 2s. c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jButtonPrint = new javax.swing.JButton(); birthdayValidatorLabel = new javax.swing.JLabel(); jDateChooserFrom = new com.toedter.calendar.JDateChooser(); jDateChooserTo = new com.toedter.calendar.JDateChooser(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); jLabel1.setFont(new java.awt.Font("DejaVu Serif", 1, 18)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("WatchDog - Report"); jLabel2.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel2.setText("Report Generation Period"); jLabel3.setText("Date (From) : "); jLabel4.setText("Date (To) : "); jLabel5.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jButtonPrint.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jButtonPrint.setText("Print Report"); jButtonPrint.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPrintActionPerformed(evt); } }); jDateChooserFrom.setDateFormatString("yyyy-MM-dd"); jDateChooserTo.setDateFormatString("yyyy-MM-dd"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(104, 104, 104).addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(56, 56, 56).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addGroup(layout.createSequentialGroup().addGap(124, 124, 124) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 128, Short.MAX_VALUE) .addComponent(jButtonPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGap(52, 52, 52)) .addGroup(layout.createSequentialGroup().addGap(92, 92, 92) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jDateChooserFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jDateChooserTo, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(26, 26, 26) .addComponent(birthdayValidatorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(35, 35, 35))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel1).addGap(18, 18, 18) .addComponent(jLabel2).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3).addComponent(jDateChooserFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jDateChooserTo, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32).addComponent(birthdayValidatorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonPrint, javax.swing.GroupLayout.DEFAULT_SIZE, 49, Short.MAX_VALUE) .addGap(54, 54, 54))); pack(); }