List of usage examples for javax.swing OverlayLayout OverlayLayout
@ConstructorProperties({ "target" }) public OverlayLayout(Container target)
From source file:com.rubenlaguna.en4j.mainmodule.NoteListTopComponent.java
/** This method is called from within the constructor to * initialize the form.// w w w . jav a 2 s . c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLayeredPane1 = new javax.swing.JLayeredPane(); jLayeredPane1.setLayout(new OverlayLayout(jLayeredPane1)); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); searchJButton = new javax.swing.JButton(); partialResultsJLabel = new javax.swing.JLabel(); jScrollPane1.setBounds(jLayeredPane1.getVisibleRect()); jTable1.setModel(getGlazedListTableModel()); jTable1.setBounds(jScrollPane1.getVisibleRect()); jTable1.setColumnSelectionAllowed(true); jScrollPane1.setViewportView(jTable1); jTable1.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jScrollPane1.setBounds(0, 0, 450, -1); jLayeredPane1.add(jScrollPane1, javax.swing.JLayeredPane.DEFAULT_LAYER); searchTextField.setText(org.openide.util.NbBundle.getMessage(NoteListTopComponent.class, "NoteListTopComponent.searchTextField.text")); // NOI18N searchTextField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { searchTextFieldFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { searchTextFieldFocusLost(evt); } }); org.openide.awt.Mnemonics.setLocalizedText(searchJButton, org.openide.util.NbBundle .getMessage(NoteListTopComponent.class, "NoteListTopComponent.searchJButton.text")); // NOI18N searchJButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchJButtonActionPerformed(evt); } }); org.openide.awt.Mnemonics.setLocalizedText(partialResultsJLabel, org.openide.util.NbBundle .getMessage(NoteListTopComponent.class, "NoteListTopComponent.partialResultsJLabel.text")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLayeredPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 469, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(searchTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(partialResultsJLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(searchJButton))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(30, 30, 30).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(searchTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(searchJButton).addComponent(partialResultsJLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(10, 10, 10) .addComponent(jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE) .addContainerGap())); }
From source file:be.ac.ua.comp.scarletnebula.gui.windows.GUI.java
private JPanel getMainPanel() { final JPanel mainPanel = new JPanel() { private static final long serialVersionUID = 1L; @Override//from w w w . jav a 2s . c o m public boolean isOptimizedDrawingEnabled() { return false; } }; mainPanel.setLayout(new OverlayLayout(mainPanel)); final JPanel underlayPanel = new JPanel(new BorderLayout()); underlayPanel.add(getServerListPanel(), BorderLayout.CENTER); underlayPanel.add(throbberPanel, BorderLayout.NORTH); final JPanel overlayPanel = getOverlayPanel(); mainPanel.add(overlayPanel); mainPanel.add(underlayPanel); return mainPanel; }
From source file:com.limegroup.gnutella.gui.search.ResultPanel.java
/** * Adds the overlay panel into the table & converts the button * to 'download'./*from ww w. j a v a 2s .co m*/ */ private void setupFakeTable(JPanel overlay) { MAIN_PANEL.removeAll(); JPanel background = new JPanel(); background.setLayout(new OverlayLayout(background)); JPanel overlayPanel = new BoxPanel(BoxPanel.Y_AXIS); overlayPanel.setOpaque(false); overlayPanel.add(Box.createVerticalStrut(20)); overlayPanel.add(overlay); overlayPanel.setMinimumSize(new Dimension(0, 0)); JComponent table = getScrolledTablePane(); table.setOpaque(false); background.add(overlayPanel); background.add(table); MAIN_PANEL.add(background); if (BUTTON_ROW != null) { MAIN_PANEL.add(Box.createVerticalStrut(GUIConstants.SEPARATOR)); MAIN_PANEL.add(BUTTON_ROW); } MAIN_PANEL.setMinimumSize(ZERO_DIMENSION); }
From source file:org.isatools.isacreatorconfigurator.configui.MenuPanel.java
public void createGUI() { ResourceInjector.get("config-ui-package.style").inject(this); setLayout(new OverlayLayout(this)); setOpaque(false);//w ww.j av a 2s.c o m SwingUtilities.invokeLater(new Runnable() { public void run() { generic = new BackgroundPanel(); add(generic, JLayeredPane.DEFAULT_LAYER); startAnimation(); menu = new CreateMenu(); menu.createGUI(); setGlassPaneToMenu(); setVisible(true); } }); }