Package org.wikipediacleaner.gui.swing.component

Examples of org.wikipediacleaner.gui.swing.component.ColorButton


    // Toolbar
    JToolBar toolbar = new JToolBar(SwingConstants.HORIZONTAL);
    toolbar.setFloatable(false);
    JToggleButton toggle = null;
    JCheckBox chk = null;
    ColorButton button = null;

    // Italic check box
    toggle = Utilities.createJToggleButton(
        "gnome-format-text-italic.png", EnumImageSize.SMALL,
        GT._("Italic"), false);
    toggle.setEnabled(italic);
    chkItalic.add(toggle);
    toolbar.add(toggle);

    // Bold check box
    toggle = Utilities.createJToggleButton(
        "gnome-format-text-bold.png", EnumImageSize.SMALL,
        GT._("Bold"), false);
    toggle.setEnabled(bold);
    chkBold.add(toggle);
    toolbar.add(toggle);

    // Underline check box
    toggle = Utilities.createJToggleButton(
        "gnome-format-text-underline.png", EnumImageSize.SMALL,
        GT._("Underline"), false);
    toggle.setEnabled(underline);
    chkUnderline.add(toggle);
    toolbar.add(toggle);

    // Strike through check box
    toggle = Utilities.createJToggleButton(
        "gnome-format-text-strikethrough.png", EnumImageSize.SMALL,
        GT._("Strike through"), false);
    toggle.setEnabled(strike);
    chkStrike.add(toggle);
    toolbar.add(toggle);

    // Foreground color check box and button
    toolbar.add(new JSeparator());
    chk = Utilities.createJCheckBox("", true);
    chk.setToolTipText(GT._("Foreground color"));
    chk.setEnabled(foreground);
    chkForeground.add(chk);
    toolbar.add(chk);
    button = new ColorButton(Color.BLACK, GT._("Choose foreground color"));
    button.setToolTipText(GT._("Foreground color"));
    button.setEnabled(foreground && chk.isSelected());
    btnForeground.add(button);
    toolbar.add(button);

    // Background color check box and button
    toolbar.add(new JSeparator());
    chk = Utilities.createJCheckBox("", true);
    chk.setToolTipText(GT._("Background color"));
    chk.setEnabled(background);
    chkBackground.add(chk);
    toolbar.add(chk);
    button = new ColorButton(Color.WHITE, GT._("Choose background color"));
    button.setToolTipText(GT._("Background color"));
    button.setEnabled(background && chk.isEnabled());
    btnBackground.add(button);
    toolbar.add(button);

    // End line
    constraints.gridx = columnFormat;
View Full Code Here


      return;
    }
    if ((line < 0) || (line >= list.size())) {
      return;
    }
    ColorButton button = list.get(line);
    if (button == null) {
      return;
    }
    button.setColor(color);
  }
View Full Code Here

TOP

Related Classes of org.wikipediacleaner.gui.swing.component.ColorButton

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.