public InformationFrame() { setType(Type.POPUP); setResizable(false); setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE); this.setTitle("Approving question"); this.setPreferredSize(new Dimension(350, 170)); this.setAlwaysOnTop(isAlwaysOnTopSupported()); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); getContentPane().setLayout(new BorderLayout()); final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); this.setLocation(screenSize.width / 2 - 150, screenSize.height / 2 - 75); this.setIconImage(Toolkit.getDefaultToolkit().getImage(InformationFrame.class.getResource(LOGOPATH))); final JPanel panel = new JPanel(); getContentPane().add(panel, BorderLayout.CENTER); panel.setLayout(null); okBtn = new JButton("OK"); okBtn.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/info_ok.png"))); okBtn.setFont(new Font("Lucida Grande", Font.PLAIN, 15)); okBtn.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null)); okBtn.setBounds(119, 102, 132, 35); okBtn.addActionListener(getAction()); panel.add(okBtn); lblMessage = new JLabel(""); lblMessage.setHorizontalTextPosition(SwingConstants.CENTER); lblMessage.setHorizontalAlignment(SwingConstants.LEFT); lblMessage.setBounds(87, 21, 246, 74); panel.add(lblMessage); lblIcon = new JLabel(""); lblIcon.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/dialogPane_question.png"))); lblIcon.setBounds(6, 36, 69, 70); panel.add(lblIcon); this.pack(); }
/** * */ private void createColorOptions() { Dimension iconDimension = new Dimension(ToolView.ICON_SIZE + 8, ToolView.ICON_SIZE + 8); colorLabel = new JLabel(Utils.msg.getString("strokecolor")+":"); colorField = new JLabel(); colorLabel.setIcon(new ImageIcon(Utils.createIconImage(ToolView.ICON_SIZE, ToolView.ICON_SIZE, "/icons/tools/color1.png"))); colorLabel.setLabelFor(colorField); colorLabel.setFont(defaultTitleFont); colorLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); colorLabel.addMouseListener(new ColorSelectionListener(colorLabel)); colorField.setPreferredSize(iconDimension); colorField.setOpaque(true); colorField.setBorder(BorderFactory.createCompoundBorder(new LineBorder(new Color(209, 209, 209), 1, true), new SoftBevelBorder(BevelBorder.LOWERED))); colorField.setBackground(DEFAULT_COLOR); colorField.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); colorField.setToolTipText(Utils.msg.getString("colorfieldtooltip")); colorField.addMouseListener(new ColorSelectionListener(colorField)); }
/** * Add parameter to this panel. * * @param param Parameter to add * @param track Parameter tracking object */ public void addParameter(Object owner, Parameter<?> param, TrackParameters track) { this.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED)); ParameterConfigurator cfg = null; { // Find Object cur = owner; while(cur != null) { cfg = childconfig.get(cur); if(cfg != null) { break; } cur = track.getParent(cur); } } if(cfg != null) { cfg.addParameter(owner, param, track); return; } else { cfg = makeConfigurator(param); cfg.addChangeListener(this); children.add(cfg); } }
public CaptureMic() { setLayout(new BorderLayout()); EmptyBorder eb = new EmptyBorder(5, 5, 5, 5); SoftBevelBorder sbb = new SoftBevelBorder(SoftBevelBorder.LOWERED); setBorder(new EmptyBorder(5, 5, 5, 5)); JPanel p1 = new JPanel(); p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS)); JPanel p2 = new JPanel(); p2.setBorder(sbb); p2.setLayout(new BoxLayout(p2, BoxLayout.Y_AXIS)); JPanel buttonsPanel = new JPanel(); buttonsPanel.setBorder(new EmptyBorder(10, 0, 5, 0)); playB = addButton("Play", buttonsPanel, false); captB = addButton("Record", buttonsPanel, true); p2.add(buttonsPanel); p1.add(p2); add(p1); }
@Override protected PropertyDescriptor[] createPropertyDescriptors() throws IntrospectionException { PropertyDescriptor[] pds = new PropertyDescriptor[] { createRO(SoftBevelBorder.class, "bevelType"), // NOI18N createRO(SoftBevelBorder.class, "highlightOuterColor"), // NOI18N createRO(SoftBevelBorder.class, "highlightInnerColor"), // NOI18N createRO(SoftBevelBorder.class, "shadowOuterColor"), // NOI18N createRO(SoftBevelBorder.class, "shadowInnerColor"), // NOI18N }; pds[0].setPropertyEditorClass(BevelBorderBeanInfo.BevelTypePropertyEditor.class); return pds; }
private void setType() { int locationPoint = 323; for (int i = 0; i < 3; i++) { roomTypes = new JTextField(); roomTypes.setColumns(10); roomTypes.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); roomTypes.setBounds(locationPoint, 97, 86, 20); roomTypes.setVisible(false); bottomPanel.add(roomTypes); roomTypeFields[i] = roomTypes; locationPoint = locationPoint + 96; } }
/** * Create the frame. */ public LicenseWindow(final String path) { setTitle("Coder HPMSA - [License]"); setBounds(100, 100, 550, 550); setBackground(Color.decode("#066d95")); setLocationRelativeTo(null); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setIconImage(Toolkit.getDefaultToolkit(). getImage(getClass().getResource(LOGOPATH))); final JScrollPane scrollPane = new JScrollPane(); scrollPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); getContentPane().add(scrollPane, BorderLayout.CENTER); editorPane = new JTextPane(); editorPane.setBackground(new Color(255, 255, 240)); editorPane.setFont(new Font("Verdana", Font.PLAIN, 13)); editorPane.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null)); editorPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); editorPane.setEditable(false); scrollPane.setViewportView(editorPane); final StyledDocument doc = editorPane.getStyledDocument(); final SimpleAttributeSet center = new SimpleAttributeSet(); StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER); doc.setParagraphAttributes(0, doc.getLength()-1, center, false); fillEditorPane(path); setVisible(true); }
private void createProgressPanel() { setLayout(new BorderLayout()); JPanel textWrapper = new JPanel(new BorderLayout()); textWrapper.setBorder(new SoftBevelBorder(BevelBorder.LOWERED)); textWrapper.setAlignmentX(LEFT_ALIGNMENT); progressTextArea = new MyTextArea(); progressTextArea.getAccessibleContext().setAccessibleName( resourceManager.getString("ProgressBarDemo.accessible_text_area_name")); progressTextArea.getAccessibleContext().setAccessibleDescription( resourceManager.getString("ProgressBarDemo.accessible_text_area_description")); textWrapper.add(new JScrollPane(progressTextArea), BorderLayout.CENTER); add(textWrapper, BorderLayout.CENTER); JPanel progressPanel = new JPanel(); add(progressPanel, BorderLayout.SOUTH); progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, text.length()) { @Override public Dimension getPreferredSize() { return new Dimension(300, super.getPreferredSize().height); } }; progressBar.getAccessibleContext().setAccessibleName( resourceManager.getString("ProgressBarDemo.accessible_text_loading_progress")); progressPanel.add(progressBar); progressPanel.add(createLoadButton()); progressPanel.add(createStopButton()); }
private void createProgressPanel() { setLayout(new BorderLayout()); JPanel textWrapper = new JPanel(new BorderLayout()); textWrapper.setBorder(new SoftBevelBorder(BevelBorder.LOWERED)); textWrapper.setAlignmentX(LEFT_ALIGNMENT); progressTextArea = new MyTextArea(); progressTextArea.getAccessibleContext().setAccessibleName( resourceManager.getString("ProgressBarDemo.accessible_text_area_name")); progressTextArea.getAccessibleContext().setAccessibleName( resourceManager.getString("ProgressBarDemo.accessible_text_area_description")); textWrapper.add(new JScrollPane(progressTextArea), BorderLayout.CENTER); add(textWrapper, BorderLayout.CENTER); JPanel progressPanel = new JPanel(); add(progressPanel, BorderLayout.SOUTH); progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, text.length()) { public Dimension getPreferredSize() { return new Dimension(300, super.getPreferredSize().height); } }; progressBar.getAccessibleContext().setAccessibleName( resourceManager.getString("ProgressBarDemo.accessible_text_loading_progress")); progressPanel.add(progressBar); progressPanel.add(createLoadButton()); progressPanel.add(createStopButton()); }
/** * Instantiates a new j sound capture. * * @param isDrawingRequired * the is drawing required * @param isSaveRequired * the is save required */ public JSoundCapture(boolean isDrawingRequired, boolean isSaveRequired) { wd = new WaveData(); this.isDrawingRequired = isDrawingRequired; this.isSaveRequired = isSaveRequired; setLayout(new BorderLayout()); setBorder(new EmptyBorder(1, 1, 1, 1)); innerPanel = new JPanel(); innerPanel.setLayout(new BoxLayout(innerPanel, BoxLayout.X_AXIS)); JPanel buttonsPanel = new JPanel(); buttonsPanel.setPreferredSize(new Dimension(200, 50)); buttonsPanel.setBorder(new EmptyBorder(5, 0, 1, 0)); playB = addButton("Play", buttonsPanel, false); captB = addButton("Record", buttonsPanel, true); pausB = addButton("Pause", buttonsPanel, false); saveB = addButton("Save ", buttonsPanel, false); innerPanel.add(buttonsPanel); // samplingPanel if (isDrawingRequired) { JPanel samplingPanel = new JPanel(new BorderLayout()); EmptyBorder eb = new EmptyBorder(2, 2, 2, 2); SoftBevelBorder sbb = new SoftBevelBorder(SoftBevelBorder.LOWERED); samplingPanel.setBorder(new CompoundBorder(eb, sbb)); samplingPanel.add(samplingGraph = new SamplingGraph()); innerPanel.add(samplingPanel); } // whole panel JPanel completePanel = new JPanel(); completePanel.setLayout(new BoxLayout(completePanel, BoxLayout.X_AXIS)); completePanel.add(innerPanel); add(completePanel); }
public FileList(final Path path, final DefaultListModel<Path> listModel) { super(listModel); this.listModel = listModel; this.path = path; this.setBorder(new SoftBevelBorder(BevelBorder.LOWERED)); this.setBackground(Color.WHITE); this. buildList(); }
private void addDisplayImage(String baseDir, String fileName, String densityPrefix, List<String> densityList) { if (densityList == null || densityList.size() == 0) { return; } Component oldComponent = null; for (String density : densityList) { JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); // Label JLabel densityLabel = new JLabel(); densityLabel.setText(density); densityLabel.setHorizontalAlignment(JLabel.CENTER); densityLabel.setBorder(new EmptyBorder(0, 0, 4, 0)); // Image JLabel iconLabel = new JLabel(); String filePath = baseDir + Constants.PATH_SEPARATOR + densityPrefix + density + Constants.PATH_SEPARATOR + fileName; Icon icon = IconUtils.createOriginalIcon(filePath); iconLabel.setIcon(icon); iconLabel.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED)); panel.add(densityLabel, BorderLayout.PAGE_START); panel.add(iconLabel, BorderLayout.CENTER); String e2 = oldComponent == null ? SpringLayout.WEST : SpringLayout.EAST; Component c2 = oldComponent == null ? mainPanel : oldComponent; layout.putConstraint(SpringLayout.NORTH, panel, 8, SpringLayout.NORTH, mainPanel); layout.putConstraint(SpringLayout.WEST, panel, 16, e2, c2); mainPanel.add(panel); oldComponent = panel; } }
/** * Default constructor. */ public StatusBar() { // Set the GUI elements of the panel setLayout(new BorderLayout(20, 0)); setForeground(Color.black); setBorder(new CompoundBorder(new EmptyBorder(2, 2, 2, 2), new SoftBevelBorder(SoftBevelBorder.LOWERED))); // Create and add the two label fields label1 = new JLabel("Ready", SwingConstants.LEFT); label2 = new JLabel("", SwingConstants.RIGHT); add(label1, BorderLayout.CENTER); add(label2, BorderLayout.EAST); }
public JPanel getPanelInferior() { if (panelInferior == null) { panelInferior = new JPanel(); panelInferior.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); panelInferior.setLayout(new GridLayout(0, 1, 0, 0)); panelInferior.add(getPanelPregunta()); panelInferior.add(getPanelRespuesta()); } return panelInferior; }
public JPanel getPanelPuntuacion() { if (panelPuntuacion == null) { panelPuntuacion = new JPanel(); panelPuntuacion.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); panelPuntuacion.setLayout(new GridLayout(3, 1, 0, 0)); panelPuntuacion.add(getAciertos()); panelPuntuacion.add(getFallos()); panelPuntuacion.add(getPanelTiempo()); } return panelPuntuacion; }
public JPanel getPanelNombreJug() { if (panelNombreJug == null) { panelNombreJug = new JPanel(); panelNombreJug.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); panelNombreJug.setLayout(new GridLayout(1, 0, 0, 0)); panelNombreJug.add(getLblJugador()); } return panelNombreJug; }
private JPanel getPanelTiempo() { if (panelTiempo == null) { panelTiempo = new JPanel(); panelTiempo.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); panelTiempo.setLayout(new BorderLayout(0, 0)); panelTiempo.add(getTiempoRestante()); JButton btnPausa = new JButton("PAUSA"); btnPausa.setMargin(new Insets(2, 5, 2, 5)); btnPausa.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { if(!pasapalabra.isPausado()) pausarJuego(); else reanudarJuego(); } private void reanudarJuego() { pasapalabra.setPausado(false); campoRespuesta.setEnabled(true); btnResponder.setEnabled(true); btnPasapalabra.setEnabled(true); tiempoRestante.setForeground(Color.BLUE); } private void pausarJuego() { pasapalabra.setPausado(true); campoRespuesta.setEnabled(false); btnResponder.setEnabled(false); btnPasapalabra.setEnabled(false); tiempoRestante.setForeground(new Color(237, 27, 36)); } }); panelTiempo.add(btnPausa, BorderLayout.SOUTH); } return panelTiempo; }
/** * This method initializes logsScrollPane * * @return javax.swing.JScrollPane */ private JScrollPane getLogsScrollPane() { if (logsScrollPane == null) { logsScrollPane = new JScrollPane(); logsScrollPane.setPreferredSize(new Dimension(400, 265)); logsScrollPane .setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); logsScrollPane .setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); logsScrollPane.setViewportBorder(new SoftBevelBorder( SoftBevelBorder.LOWERED)); logsScrollPane.setViewportView(getLogsText()); } return logsScrollPane; }
public void createProgressPanel() { getDemoPanel().setLayout(new BorderLayout()); JPanel textWrapper = new JPanel(new BorderLayout()); textWrapper.setBorder(new SoftBevelBorder(BevelBorder.LOWERED)); textWrapper.setAlignmentX(LEFT_ALIGNMENT); progressTextArea = new MyTextArea(); progressTextArea.getAccessibleContext().setAccessibleName(getString("ProgressBarDemo.accessible_text_area_name")); progressTextArea.getAccessibleContext().setAccessibleName(getString("ProgressBarDemo.accessible_text_area_description")); textWrapper.add(new JScrollPane(progressTextArea), BorderLayout.CENTER); getDemoPanel().add(textWrapper, BorderLayout.CENTER); JPanel progressPanel = new JPanel(); getDemoPanel().add(progressPanel, BorderLayout.SOUTH); progressBar = new JProgressBar(JProgressBar.HORIZONTAL, 0, text.length()) { public Dimension getPreferredSize() { return new Dimension(300, super.getPreferredSize().height); } }; progressBar.getAccessibleContext().setAccessibleName(getString("ProgressBarDemo.accessible_text_loading_progress")); progressPanel.add(progressBar); progressPanel.add(createLoadButton()); progressPanel.add(createStopButton()); }
private JButton finishButton(JButton b, String actionCommand, String toolTip) { b.setActionCommand(actionCommand); b.setFocusable(false); b.setBorderPainted(false); b.setBorder(new SoftBevelBorder(BevelBorder.RAISED)); b.setBackground(bgColor); b.addActionListener(this); b.addMouseListener(this); // move over the button => draw border b.setToolTipText(toolTip); return b; }
public SoftBevelBorderBeanInfo() { super("softBevelBorder", javax.swing.border.SoftBevelBorder.class); // NOI18N }
public DialogFrame() { setType(Type.POPUP); setResizable(false); setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE); this.setTitle("Approving question"); this.setPreferredSize(new Dimension(400, 190)); this.setAlwaysOnTop(isAlwaysOnTopSupported()); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); getContentPane().setLayout(new BorderLayout()); final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); this.setLocation(screenSize.width / 2 - 150, screenSize.height / 2 - 75); this.setIconImage(Toolkit.getDefaultToolkit(). getImage(getClass().getResource(LOGOPATH))); final JPanel panel = new JPanel(); panel.setAutoscrolls(true); getContentPane().add(panel, BorderLayout.CENTER); panel.setLayout(null); btnYes = new JButton("YES"); btnYes.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null)); btnYes.setBounds(291, 129, 91, 29); panel.add(btnYes); btnNo = new JButton("NO"); btnNo.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null)); btnNo.setBounds(199, 129, 91, 29); panel.add(btnNo); lblIcon = new JLabel(""); lblIcon.setIcon(new ImageIcon(DialogFrame.class.getResource("/com/coder/hms/icons/dialogPane_question.png"))); lblIcon.setBounds(14, 40, 69, 70); panel.add(lblIcon); textArea = new JTextArea(); textArea.setDisabledTextColor(new Color(153, 204, 255)); textArea.setBounds(95, 32, 287, 85); textArea.setBackground(UIManager.getColor("ComboBox.background")); textArea.setBorder(null); textArea.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); textArea.setEditable(false); textArea.setFont(new Font("Monospaced", Font.PLAIN, 14)); textArea.setLineWrap(true); panel.add(textArea); this.pack(); }
/** * Create the frame. */ public ReadLogsWindow() { setTitle("Coder HPMSA - [Read Logs]"); setBounds(100, 100, 660, 550); setBackground(Color.decode("#066d95")); setLocationRelativeTo(null); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setIconImage(Toolkit.getDefaultToolkit(). getImage(getClass().getResource(LOGOPATH))); final JScrollPane scrollPane = new JScrollPane(); scrollPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); getContentPane().add(scrollPane, BorderLayout.CENTER); editorPane = new JTextPane(); editorPane.setBackground(new Color(255, 255, 240)); editorPane.setFont(new Font("Verdana", Font.PLAIN, 13)); editorPane.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null)); editorPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT); editorPane.setEditable(false); scrollPane.setViewportView(editorPane); final JPanel filesPanel = new JPanel(); filesPanel.setPreferredSize(new Dimension(200, 10)); getContentPane().add(filesPanel, BorderLayout.EAST); filesPanel.setLayout(new BorderLayout(0, 0)); final JScrollPane listScrollPane = new JScrollPane(); listScrollPane.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); listScrollPane.setViewportView(logFilesList()); filesPanel.add(listScrollPane, BorderLayout.CENTER); final JPanel titlePanel = new JPanel(); titlePanel.setPreferredSize(new Dimension(10, 40)); titlePanel.setBackground(Color.decode("#066d95")); titlePanel.setAutoscrolls(true); getContentPane().add(titlePanel, BorderLayout.NORTH); titlePanel.setLayout(new BorderLayout(0, 0)); final JLabel lblTitle = new JLabel("SYSTEM LOG RECORDS"); lblTitle.setHorizontalTextPosition(SwingConstants.CENTER); lblTitle.setHorizontalAlignment(SwingConstants.CENTER); lblTitle.setAutoscrolls(true); lblTitle.setFont(new Font("Verdana", Font.BOLD, 25)); lblTitle.setForeground(UIManager.getColor("Button.highlight")); titlePanel.add(lblTitle, BorderLayout.CENTER); final StyledDocument doc = editorPane.getStyledDocument(); final SimpleAttributeSet center = new SimpleAttributeSet(); StyleConstants.setAlignment(center, StyleConstants.ALIGN_CENTER); doc.setParagraphAttributes(0, doc.getLength(), center, false); setVisible(true); }
protected SoftBevelBorder getObject() { return new SoftBevelBorder(BevelBorder.RAISED, Color.RED, Color.GREEN, Color.BLUE, Color.WHITE); }
protected SoftBevelBorder getAnotherObject() { return null; // TODO: could not update property // return new SoftBevelBorder(BevelBorder.LOWERED); }
public static Border createRaisedSoftBevelBorder() { return new SoftBevelBorder(BevelBorder.RAISED); }
public static Border createLoweredSoftBevelBorder() { return new SoftBevelBorder(BevelBorder.LOWERED); }
public static Border createSoftBevelBorder(int type, Color highlight, Color shadow) { return new SoftBevelBorder(type, highlight, shadow); }