public static JXPanel getDescription(CardView card, int width, int height) { JXPanel descriptionPanel = new JXPanel(); //descriptionPanel.setAlpha(.8f); descriptionPanel.setBounds(0, 0, width, height); descriptionPanel.setVisible(false); descriptionPanel.setLayout(null); //descriptionPanel.setBorder(BorderFactory.createLineBorder(Color.green)); JButton j = new JButton(""); j.setBounds(0, 0, width, height); j.setBackground(Color.black); j.setLayout(null); JLabel cardText = new JLabel(); cardText.setBounds(5, 5, width - 10, height - 10); cardText.setForeground(Color.white); cardText.setFont(cardNameFont); cardText.setVerticalAlignment(SwingConstants.TOP); j.add(cardText); TextLines textLines = GuiDisplayUtil.getTextLinesfromCardView(card); cardText.setText(getRulefromCardView(card, textLines).toString()); descriptionPanel.add(j); return descriptionPanel; }
/** * Adds a <code>JXTaskPane</code> to this JXTaskPaneContainer. * * @param group */ public void add(JXTaskPane group) { super.add(group); }
/** * Adds the given JComponent as a decoration on the right of the title * @param decoration */ @Override public void setRightDecoration(JComponent decoration) { if (right != null) topPanel.remove(right); right = decoration; if (right != null) { topPanel.add(decoration, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.rightDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the left of the title * @param decoration */ @Override public void setLeftDecoration(JComponent decoration) { if (left != null) topPanel.remove(left); left = decoration; if (left != null) { topPanel.add(left, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.leftDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the left of the title * @param decoration */ @Override public void setLeftDecoration(JComponent decoration) { if (left != null) topPanel.remove(left); left = decoration; if (left != null) { topPanel.add(left, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.leftDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the right of the title * @param decoration */ @Override public void setRightDecoration(JComponent decoration) { if (right != null) topPanel.remove(right); right = decoration; if (right != null) { topPanel.add(decoration, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.rightDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the right of the title * @param decoration */ @Override public void setRightDecoration(JComponent decoration) { if (right != null) topPanel.remove(right); right = decoration; if (right != null) { topPanel.add(decoration, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.rightDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the right of the title * @param decoration */ @Override public void setRightDecoration(JComponent decoration) { if (right != null) topPanel.remove(right); right = decoration; if (right != null) { topPanel.add(decoration, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.rightDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the left of the title * @param decoration */ @Override public void setLeftDecoration(JComponent decoration) { if (left != null) topPanel.remove(left); left = decoration; if (left != null) { topPanel.add(left, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.leftDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the left of the title * @param decoration */ @Override public void setLeftDecoration(JComponent decoration) { if (left != null) topPanel.remove(left); left = decoration; if (left != null) { topPanel.add(left, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.leftDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the right of the title * @param decoration */ @Override public void setRightDecoration(JComponent decoration) { if (right != null) topPanel.remove(right); right = decoration; if (right != null) { topPanel.add(decoration, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.rightDecorationInsets"), 0, 0)); } }
/** * Adds the given JComponent as a decoration on the left of the title * @param decoration */ @Override public void setLeftDecoration(JComponent decoration) { if (left != null) topPanel.remove(left); left = decoration; if (left != null) { topPanel.add(left, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, UIManager.getInsets("JXTitledPanel.leftDecorationInsets"), 0, 0)); } }
/** * Recreates the login panel, and replaces the current one with the new one */ protected void recreateLoginPanel() { JXPanel old = loginPanel; loginPanel = createLoginPanel(); loginPanel.setBorder(BorderFactory.createEmptyBorder(0, 36, 7, 11)); contentPanel.remove(old); contentPanel.add(loginPanel, 1); }
/** * Recreates the login panel, and replaces the current one with the new one */ protected void recreateLoginPanel() { JXPanel old = loginPanel; loginPanel = createLoginPanel(); loginPanel.setBorder(BorderFactory.createEmptyBorder(0, 36, 7, 11)); contentPanel.remove(old); contentPanel.add(loginPanel, 1); }
/** * Recreates the login panel, and replaces the current one with the new one */ protected void recreateLoginPanel() { JXPanel old = loginPanel; loginPanel = createLoginPanel(); loginPanel.setBorder(BorderFactory.createEmptyBorder(0, 36, 7, 11)); contentPanel.remove(old); contentPanel.add(loginPanel, 1); }
@Override public void actionPerformed(ActionEvent e) { layer = Utilities.actionsGlobalContext().lookup(Layer.class); assert layer != null; JXPanel panel = new JXPanel(new MigLayout("wrap 2")); panel.add(new JLabel(NbBundle.getMessage(this.getClass(), "mark_all_shapes_as.dialog.choose"))); panel.add(comboBox); DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(this.getClass(), "mark_all_shapes_as.dialog.title")); dd.setOptions(new Object[]{getOkButton(), getCancelButton()}); dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); }
@Override public void actionPerformed(ActionEvent e) { panel = new JXPanel(new MigLayout("wrap 2")); actionModel = new DefaultComboBoxModel(new Object[]{ACTION_OPTION_ONE}); actionComboBox = new JComboBox(actionModel); panel.add(new JLabel(LABEL_CHOICE)); panel.add(actionComboBox); DialogDescriptor dd = new DialogDescriptor(panel, DISPLAY_NAME); dd.setOptions(new Object[]{getOkButton(), getCancelButton()}); dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); }
@Override public void actionPerformed(ActionEvent e) { JXPanel panel = new JXPanel(new MigLayout("wrap 2")); panel.add(new JLabel(NbBundle.getMessage(AreaFieldModule.class, "action.mark_all_shapes_as.dialog.label.choose_shape"))); panel.add(comboBox); DialogDescriptor dd = new DialogDescriptor(panel, NbBundle.getMessage(AreaFieldModule.class, "action.mark_all_shapes_as.dialog.title")); dd.setOptions(new Object[]{getOkButton(), getCancelButton()}); dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); }
@Override public void actionPerformed(ActionEvent arg0) { assert sensorDataObject != null; JXPanel panel = new JXPanel(new MigLayout("wrap 2")); comboBox.setSelectedItem(sensorDataObject.getPalette()); panel.add(new JLabel("choose:")); panel.add(comboBox); DialogDescriptor dd = new DialogDescriptor(panel, DISPLAY_NAME); dd.setOptions(new Object[]{getOkButton(), getCancelButton()}); dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); }
@Override public void actionPerformed(ActionEvent e) { JXPanel panel = new JXPanel(new MigLayout("wrap 2")); String confirmationText = NbBundle.getMessage(AreaFieldModule.class, "action.remove_line.dialog.confirmation_text", line.getName()); panel.add(new JLabel(confirmationText)); // Create the dialog and add the ok and cancel buttons DialogDescriptor dd = new DialogDescriptor(panel, DIALOG_DISPLAY_NAME); // OK and Cancel-Buttons dd.setOptions(new Object[]{getOkButton(), getCancelButton()}); dlg = DialogDisplayer.getDefault().createDialog(dd); dlg.setVisible(true); }