Package javax.swing

Examples of javax.swing.JColorChooser$AccessibleJColorChooser


        left.setBackground(Color.red);
        left.setPreferredSize(new Dimension(100, 100));

        openb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent event) {
                JColorChooser clr = new JColorChooser();
                Color color = clr.showDialog(panel, "Choose Color", Color.white);
                left.setBackground(color);
            }
        });

        JPanel right = new JPanel();
View Full Code Here


    @Override
    public void actionPerformed(ActionEvent arg0)
    {
        Component cmpRoot = BtnChoiceColorAbs._s_getTopParent_(this);

        JColorChooser chooser = new JColorChooser();
       
        Color col = chooser.showDialog(
            cmpRoot, "Choose color", getBackground());

        if (col != null)
            setBackground(col);
View Full Code Here

            jTabbedPane.addTab("Background Color", null,
                jPanelBgColor, null);
            jPanelBgColor.setPreferredSize(new java.awt.Dimension(
                615, 272));
            {
              jColorChooserBgColor = new JColorChooser();
              jPanelBgColor.add(jColorChooserBgColor,
                  BorderLayout.CENTER);
            }
          }
          {
View Full Code Here

 
  ColorChooserDialog(JFrame parent) {
    super(parent);
    setModal(true);
    setLayout(new BorderLayout());
    chooser = new JColorChooser();
    add(chooser, BorderLayout.CENTER);
   
    JPanel buttonPanel = new JPanel(new FlowLayout());
    okButton = new JButton("OK");
    cancelButton = new JButton("Cancel");
View Full Code Here

     *
     * @param parent The component which is the parent of this dialog
     * @return
     */
    public static SColor showSColorChooser(Component parent) {
        final JColorChooser chooser = new JColorChooser();
        chooser.setChooserPanels(new AbstractColorChooserPanel[]{new SColorChooserPanel()});

        JDialog dialog = JColorChooser.createDialog(parent, "Choose A Color", true, chooser, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                pickedColor = asSColor(chooser.getColor().getRGB());
            }
        }, null);
        dialog.setLocationRelativeTo(parent);
        dialog.setVisible(true);

View Full Code Here

              showMouseSelectionBox.setSelected(false);

            final JButton hBoxButton = new JButton(Messages.getMessage("PdfPreferences.ChangeHighlightColor"));
            hBoxButton.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e) {
                    JColorChooser cc = new JColorChooser(currentBox);
                    Color c = cc.showDialog(null, "Highlight Color", currentBox);
                    highlightBoxColor.setBackground(c);

                }
            });

            final JButton hTextButton = new JButton(Messages.getMessage("PdfPreferences.ChangeHighlightTextColor"));
            hTextButton.addActionListener(new ActionListener(){
                public void actionPerformed(ActionEvent e) {
                    JColorChooser cc = new JColorChooser(currentText);
                    Color c = cc.showDialog(null, "Highlighted Text Color", currentText);
                    highlightTextColor.setBackground(c);
                }
            });

            final JLabel hCompLabel = new JLabel(Messages.getMessage("PdfPreferences.ChangeHighlightTransparency"));
View Full Code Here

            button.setActionCommand(EDIT);
            button.addActionListener(this);
            button.setBorderPainted(false);

            // Set up the dialog that the button brings up.
            colorChooser = new JColorChooser();
            dialog = JColorChooser.createDialog(button, "Pick a Color", true, // modal
                    colorChooser, this, // OK button handler
                    null); // no CANCEL button handler
        }
View Full Code Here

    private JColorChooser chooser;
    private Color choosenColor;

    @Before
    public void setUp() throws Exception {
        chooser = new JColorChooser();
        choosenColor = Color.RED;
        colorChooser = new MColorChooser(chooser, "ColorChooser", null, WindowMonitor.getInstance());
        chooser.setColor(choosenColor);
    }
View Full Code Here

        public void actionPerformed(ActionEvent e) {
            Color color = ColorUtil.getColor(textField.getText());
            if (color == null) {
                color = Color.BLUE;
            }
            final JColorChooser colorChooser = new JColorChooser(color);
            AbstractColorChooserPanel[] panels = colorChooser.getChooserPanels();
            colorChooser.setChooserPanels(new AbstractColorChooserPanel[] { panels[2], panels[1] });
            colorChooser.setPreviewPanel(new LinkColorPreview(colorChooser));
            colorChooser.setBorder(Borders.DIALOG_BORDER);
            ActionListener okListener = new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    textField.setText(ColorUtil.toHex(colorChooser.getColor()));
                }
            };
            JDialog dialog = JColorChooser.createDialog(DocumentDialog.this, "Select Link Color", true, colorChooser,
                                                        okListener, null);
            dialog.setResizable(false);
View Full Code Here

     * @return JColorChooser
     */
    private JColorChooser getColourChooser() {
        if (ivjColourChooser == null) {
            try {
                ivjColourChooser = new JColorChooser();
                ivjColourChooser.setName("ColourChooser");
            } catch (Throwable ivjExc) {
                handleException(ivjExc);
            }
        }
View Full Code Here

TOP

Related Classes of javax.swing.JColorChooser$AccessibleJColorChooser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.