List of usage examples for javax.swing JPanel setOpaque
@BeanProperty(expert = true, description = "The component's opacity") public void setOpaque(boolean isOpaque)
From source file:com.apatar.webdav.ui.JWebDavTreeModePanel.java
private JPanel getFoldersPanel() { JPanel panel = new JPanel(); panel.setOpaque(false); JScrollPane srollPane = new JScrollPane(createFolderTable()); srollPane.setPreferredSize(new Dimension(470, 320)); srollPane.setBorder(null);//from w ww.j a v a 2 s . c o m panel.add(srollPane); return panel; }
From source file:es.emergya.ui.plugins.forms.FormGeneric.java
protected void addDate(Date fecha, String title, boolean editable) { rows++;/*from w w w. j a v a 2s . c o m*/ // TODO editable mid.add(new JLabel(i18n.getString(title), JLabel.RIGHT)); JPanel panel = new JPanel(); panel.setOpaque(false); JCalendarCombo calendar = new JCalendarCombo(); calendar.setName(title); calendar.setEditable(editable); calendar.setPreferredSize(new Dimension(300, 30)); calendar.setDate(fecha); panel.add(calendar); componentes.add(calendar); JSpinner res = new JSpinner(new SpinnerDateModel()); res.setName(title); res.setPreferredSize(new Dimension(60, 30)); res.setName(title); JSpinner.DateEditor startEditor = new JSpinner.DateEditor(res, "HH:mm:ss"); startEditor.setEnabled(editable); res.setEditor(startEditor); if (fecha != null) res.setValue(fecha); componentes.add(res); panel.add(res); mid.add(panel); for (int i = 3; i < cols; i++) mid.add(Box.createHorizontalGlue()); }
From source file:es.emergya.ui.gis.popups.ListaCapas.java
private ListaCapas(CustomMapView mapView, final IMapViewer historyMapViewer) { super();/* ww w. j av a 2 s . c o m*/ setTitle(i18n.getString("window.gpx.titleBar")); setLocationRelativeTo(getBasicWindow().getFrame()); setResizable(false); setAlwaysOnTop(true); this.mapView = mapView; this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); setIconImage(getBasicWindow().getFrame().getIconImage()); JPanel dialogo = new JPanel(new BorderLayout()); dialogo.setBackground(Color.WHITE); dialogo.setBorder(new EmptyBorder(10, 10, 10, 10)); capasGpx = new JPanel(); capasGpx.setBackground(Color.WHITE); capasGpx.setLayout(new BoxLayout(capasGpx, BoxLayout.Y_AXIS)); JScrollPane lista = new JScrollPane(capasGpx); lista.setOpaque(false); lista.setBorder(new TitledBorder(i18n.getString("window.gpx.title"))); dialogo.add(lista, BorderLayout.CENTER); JPanel boton = new JPanel(new FlowLayout()); boton.setOpaque(false); JButton cargar = getCargarGPXButton(); boton.add(cargar, FlowLayout.LEFT); dialogo.add(boton, BorderLayout.SOUTH); add(dialogo); setPreferredSize(new Dimension(400, 250)); pack(); setLocationRelativeTo((Component) mapView); this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { super.windowClosed(e); // historyMapViewer.getGPXButton().setSelected(false); } }); }
From source file:com.hp.alm.ali.idea.cfg.AliConfigurable.java
protected void addAdditionalSettings(JPanel panel, GridBagConstraints c) { c.gridx = 0;//from www . ja va 2s.c o m c.gridy++; JPanel spacer = new JPanel(); spacer.setOpaque(false); spacer.setBorder(new EmptyBorder(10, 0, 0, 0)); panel.add(spacer, c); spellChecker = new JCheckBox("Enable spell checker"); spellChecker.setSelected(aliConfiguration.spellChecker); if (!SpellCheckerManager.isAvailable()) { spellChecker.setEnabled(false); spellChecker.setToolTipText("feature not available for this IDE version"); } c.gridx = 1; c.gridy++; c.gridwidth = 3; panel.add(spellChecker, c); devMotiveAnnotation = new JCheckBox("Enable annotations"); devMotiveAnnotation.setSelected(aliConfiguration.devMotiveAnnotation); c.gridy++; panel.add(devMotiveAnnotation, c); }
From source file:es.emergya.ui.gis.popups.GenericDialog.java
protected void addDate(Date fecha, String title, boolean editable) { rows++;//from w w w.j ava 2s. com // TODO editable mid.add(new JLabel(i18n.getString(title), JLabel.RIGHT)); JPanel panel = new JPanel(); panel.setOpaque(false); JCalendarCombo calendar = new JCalendarCombo(); calendar.setEditable(editable); calendar.setPreferredSize(new Dimension(300, 30)); calendar.setDate(fecha); calendar.setName(title); componentes.add(calendar); panel.add(calendar); JSpinner res = new JSpinner(new SpinnerDateModel()); res.setName(title); res.setPreferredSize(new Dimension(60, 30)); JSpinner.DateEditor startEditor = new JSpinner.DateEditor(res, "HH:mm:ss"); startEditor.setEnabled(editable); res.setEditor(startEditor); componentes.add(res); if (fecha != null) res.setValue(fecha); panel.add(res); mid.add(panel); for (int i = 3; i < cols; i++) mid.add(Box.createHorizontalGlue()); }
From source file:BooksDemo.java
public BooksDemo() { super("AmazonPick"); JButton cover1 = UIHelper.createButton("", "cover1_small_button", true); cover1.addActionListener(new CoverSwitcher("cover1")); JButton cover2 = UIHelper.createButton("", "cover2_small_button", true); cover2.addActionListener(new CoverSwitcher("cover2")); JButton cover3 = UIHelper.createButton("", "cover3_small_button", true); cover3.addActionListener(new CoverSwitcher("cover3")); JPanel buttons = new JPanel(); buttons.add(cover1);/*from w w w.j av a 2s . c o m*/ buttons.add(cover2); buttons.add(cover3); buttons.setOpaque(false); c3d = new Canvas3D(SimpleUniverse.getPreferredConfiguration()); c3d.setSize(CANVAS3D_WIDTH, CANVAS3D_HEIGHT); xpanel.add(c3d); xpanel.setOpaque(false); this.setContentPane(new GradientPanel()); this.getContentPane().setLayout(new BorderLayout()); this.getContentPane().add(xpanel, BorderLayout.CENTER); this.getContentPane().add(buttons, BorderLayout.SOUTH); this.pack(); this.setResizable(false); this.setDefaultCloseOperation(EXIT_ON_CLOSE); UIHelper.centerOnScreen(this); }
From source file:es.emergya.ui.gis.popups.GenericDialog.java
protected void addJoinedRow(String[][] pairs, Integer[] colsLength) { if (pairs == null || pairs.length == 0 || pairs.length != colsLength.length) return;// www. ja v a 2s . c o m rows++; int contador = 0; for (int i : colsLength) contador += i; final FlowLayout flowLayout = new FlowLayout(); JPanel panel = new JPanel(flowLayout); panel.setOpaque(false); JTextField jtextField = new JTextField(pairs[0][1]); jtextField.setEditable(true); jtextField.setColumns(colsLength[0]); panel.add(jtextField); mid.add(new JLabel(i18n.getString(pairs[0][0]), JLabel.RIGHT)); for (int i = 1; i < pairs.length; i++) { String[] pair = pairs[i]; if (pair.length != 2) log.error("Par desconocido"); else { panel.add(new JLabel(i18n.getString(pair[0]), JLabel.RIGHT)); jtextField = new JTextField(pair[1]); jtextField.setEditable(true); panel.add(jtextField); jtextField.setColumns(colsLength[i]); } } if (contador < 100) for (int i = contador; i < 100; i += 5) panel.add(new JLabel(" ")); mid.add(panel); for (int i = 2; i < cols; i++) mid.add(Box.createHorizontalGlue()); }
From source file:com.intel.stl.ui.monitor.view.PSPortsDetailsPanel.java
protected JPanel createTitlePanel() { JPanel panel = new JPanel(new BorderLayout(5, 1)); panel.setOpaque(false); numberLabel = ComponentFactory.getH1Label(STLConstants.K0039_NOT_AVAILABLE.getValue(), Font.PLAIN); numberLabel.setHorizontalAlignment(JLabel.RIGHT); panel.add(numberLabel, BorderLayout.CENTER); nameLabel = ComponentFactory.getH3Label("", Font.PLAIN); nameLabel.setHorizontalAlignment(JLabel.LEFT); nameLabel.setVerticalAlignment(JLabel.BOTTOM); panel.add(nameLabel, BorderLayout.EAST); return panel; }
From source file:com.intel.stl.ui.monitor.view.PSPortsDetailsPanel.java
protected JPanel createDeviceTypePanel() { JPanel panel = new JPanel(); panel.setOpaque(false); panel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2)); GridBagLayout gridBag = new GridBagLayout(); panel.setLayout(gridBag);//from ww w .j a v a 2 s .com GridBagConstraints gc = new GridBagConstraints(); gc.insets = new Insets(8, 2, 2, 2); gc.weighty = 0; gc.weightx = 1; gc.gridwidth = GridBagConstraints.REMAINDER; gc.gridheight = 1; deviceTypeChartPanel = new ChartPanel(null); deviceTypeChartPanel.setPreferredSize(new Dimension(80, 60)); panel.add(deviceTypeChartPanel, gc); typeNumberLabels = new JLabel[nodeTypes.length]; typeNameLabels = new JLabel[nodeTypes.length]; gc.fill = GridBagConstraints.BOTH; gc.insets = new Insets(2, 2, 2, 2); for (int i = 0; i < nodeTypes.length; i++) { gc.weightx = 1; gc.gridwidth = 1; typeNumberLabels[i] = createNumberLabel(); panel.add(typeNumberLabels[i], gc); gc.weightx = 0; gc.gridwidth = GridBagConstraints.REMAINDER; typeNameLabels[i] = createNameLabel(nodeTypes[i].getName()); panel.add(typeNameLabels[i], gc); } return panel; }
From source file:com.intel.stl.ui.monitor.view.PSPortsDetailsPanel.java
protected JPanel createFlowTypePanel() { JPanel panel = new JPanel(); panel.setOpaque(false); panel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2)); GridBagLayout gridBag = new GridBagLayout(); panel.setLayout(gridBag);/*w ww . jav a 2 s . c om*/ GridBagConstraints gc = new GridBagConstraints(); gc.insets = new Insets(8, 2, 2, 2); gc.weighty = 0; gc.weightx = 1; gc.gridwidth = GridBagConstraints.REMAINDER; gc.gridheight = 1; flowTypeChartPanel = new ChartPanel(null); flowTypeChartPanel.setPreferredSize(new Dimension(80, 60)); panel.add(flowTypeChartPanel, gc); flowNumberLabels = new JLabel[flowTypes.length]; flowNameLabels = new JLabel[flowTypes.length]; gc.fill = GridBagConstraints.BOTH; gc.insets = new Insets(2, 2, 2, 2); for (int i = 0; i < flowTypes.length; i++) { gc.weightx = 1; gc.gridwidth = 1; flowNumberLabels[i] = createNumberLabel(); panel.add(flowNumberLabels[i], gc); gc.weightx = 0; gc.gridwidth = GridBagConstraints.REMAINDER; flowNameLabels[i] = createNameLabel(flowTypes[i].getName()); panel.add(flowNameLabels[i], gc); } return panel; }