Java Code Examples for java.awt.Color#darkGray()

The following examples show how to use java.awt.Color#darkGray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SelectData.java    From KEEL with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Crisp button
 * @param e Event
 */
public void crisp_actionPerformed(ActionEvent e) {
    if (crispc.getBackground() == Color.darkGray) {
        crispc.setBackground(new Color(225, 225, 225));
        crisp.setVisible(false);
    } else {
        if (pos_initial_c == 0) {
            this.add(crisp);
            pos_initial_c = pos;
            //crisplqd.setBackground(new Color(112, 154, 209));
            crisp.setBackground(new Color(204, 204, 204));
            crisp.removeAll();

            org.jdesktop.layout.GroupLayout crispl = new org.jdesktop.layout.GroupLayout(crisp);
            crisp.setLayout(crispl);
            datasetListC = new Vector();
            actualListC = new Vector();
            datasetXMLC = new Vector();
            checksC = new Vector();
            posic = reload_crisp();
            crisp.setBounds(15, titulo3.getY() + 25 + 25, componentWidth, posic);
        }
        crisp.setVisible(true);
        crispc.setBackground(Color.darkGray);
    }
}
 
Example 2
Source File: XYShapeRenderer.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new <code>XYShapeRenderer</code> instance with default
 * attributes.
 */
public XYShapeRenderer() {
    this.paintScale = new LookupPaintScale();
    this.useFillPaint = false;
    this.drawOutlines = false;
    this.useOutlinePaint = true;
    this.guideLinesVisible = false;
    this.guideLinePaint = Color.darkGray;
    this.guideLineStroke = new BasicStroke();
    setBaseShape(new Ellipse2D.Double(-5.0, -5.0, 10.0, 10.0));
    setAutoPopulateSeriesShape(false);
}
 
Example 3
Source File: ChartServiceImpl.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
private static Color parseColor(String color) {
	if(color != null) {
		if(color.trim().startsWith("#")){
			// HTML colors (#FFFFFF format)
			return new Color(Integer.parseInt(color.substring(1), 16));
		}else if(color.trim().startsWith("rgb")){
			// HTML colors (rgb(255, 255, 255) format)
			String values = color.substring(color.indexOf("(") + 1, color.indexOf(")"));
			String rgb[] = values.split(",");
			return new Color(Integer.parseInt(rgb[0].trim()), Integer.parseInt(rgb[1].trim()), Integer.parseInt(rgb[2].trim()));
		}else{
			// Colors by name
			if(color.equalsIgnoreCase("black")) return Color.black;
			if(color.equalsIgnoreCase("grey")) return Color.gray;
			if(color.equalsIgnoreCase("yellow")) return Color.yellow;
			if(color.equalsIgnoreCase("green")) return Color.green;
			if(color.equalsIgnoreCase("blue")) return Color.blue;
			if(color.equalsIgnoreCase("red")) return Color.red;
			if(color.equalsIgnoreCase("orange")) return Color.orange;
			if(color.equalsIgnoreCase("cyan")) return Color.cyan;
			if(color.equalsIgnoreCase("magenta")) return Color.magenta;
			if(color.equalsIgnoreCase("darkgray")) return Color.darkGray;
			if(color.equalsIgnoreCase("lightgray")) return Color.lightGray;
			if(color.equalsIgnoreCase("pink")) return Color.pink;
			if(color.equalsIgnoreCase("white")) return Color.white;
		}
	}
	log.info("Unable to parse body background-color (color:" + color+"). Assuming white.");
	return Color.white;
}
 
Example 4
Source File: ColorMapper.java    From osp with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Sets the color palette.
 * @param _colors
 */
public void setColorPalette(Color[] _colors) {
  floorColor = Color.darkGray;
  ceilColor = Color.lightGray;
  colors = _colors;
  numColors = colors.length;
  paletteType = CUSTOM;
}
 
Example 5
Source File: StandardChartTheme.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates and returns a theme called "Darkness".  In this theme, the
 * charts have a black background.
 *
 * @return The "Darkness" theme.
 */
public static ChartTheme createDarknessTheme() {
    StandardChartTheme theme = new StandardChartTheme("Darkness");
    theme.titlePaint = Color.white;
    theme.subtitlePaint = Color.white;
    theme.legendBackgroundPaint = Color.black;
    theme.legendItemPaint = Color.white;
    theme.chartBackgroundPaint = Color.black;
    theme.plotBackgroundPaint = Color.black;
    theme.plotOutlinePaint = Color.yellow;
    theme.baselinePaint = Color.white;
    theme.crosshairPaint = Color.red;
    theme.labelLinkPaint = Color.lightGray;
    theme.tickLabelPaint = Color.white;
    theme.axisLabelPaint = Color.white;
    theme.shadowPaint = Color.darkGray;
    theme.itemLabelPaint = Color.white;
    theme.drawingSupplier = new DefaultDrawingSupplier(
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC"), Color.decode("0xFF0000"),
                    Color.decode("0xFFFF7F"), Color.decode("0x6681CC"),
                    Color.decode("0xFF7F7F"), Color.decode("0xFFFFBF"),
                    Color.decode("0x99A6CC"), Color.decode("0xFFBFBF"),
                    Color.decode("0xA9A938"), Color.decode("0x2D4587")},
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC")},
            new Stroke[] {new BasicStroke(2.0f)},
            new Stroke[] {new BasicStroke(0.5f)},
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    theme.wallPaint = Color.darkGray;
    theme.errorIndicatorPaint = Color.lightGray;
    theme.gridBandPaint = new Color(255, 255, 255, 20);
    theme.gridBandAlternatePaint = new Color(255, 255, 255, 40);
    theme.shadowGenerator = null;
    return theme;
}
 
Example 6
Source File: ChartColor.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Convenience method to return an array of <code>Paint</code> objects that
 * represent the pre-defined colors in the <code>Color</code> and
 * <code>ChartColor</code> objects.
 *
 * @return An array of objects with the <code>Paint</code> interface.
 */
public static Paint[] createDefaultPaintArray() {

    return new Paint[] {
        new Color(0xFF, 0x55, 0x55),
        new Color(0x55, 0x55, 0xFF),
        new Color(0x55, 0xFF, 0x55),
        new Color(0xFF, 0xFF, 0x55),
        new Color(0xFF, 0x55, 0xFF),
        new Color(0x55, 0xFF, 0xFF),
        Color.pink,
        Color.gray,
        ChartColor.DARK_RED,
        ChartColor.DARK_BLUE,
        ChartColor.DARK_GREEN,
        ChartColor.DARK_YELLOW,
        ChartColor.DARK_MAGENTA,
        ChartColor.DARK_CYAN,
        Color.darkGray,
        ChartColor.LIGHT_RED,
        ChartColor.LIGHT_BLUE,
        ChartColor.LIGHT_GREEN,
        ChartColor.LIGHT_YELLOW,
        ChartColor.LIGHT_MAGENTA,
        ChartColor.LIGHT_CYAN,
        Color.lightGray,
        ChartColor.VERY_DARK_RED,
        ChartColor.VERY_DARK_BLUE,
        ChartColor.VERY_DARK_GREEN,
        ChartColor.VERY_DARK_YELLOW,
        ChartColor.VERY_DARK_MAGENTA,
        ChartColor.VERY_DARK_CYAN,
        ChartColor.VERY_LIGHT_RED,
        ChartColor.VERY_LIGHT_BLUE,
        ChartColor.VERY_LIGHT_GREEN,
        ChartColor.VERY_LIGHT_YELLOW,
        ChartColor.VERY_LIGHT_MAGENTA,
        ChartColor.VERY_LIGHT_CYAN
    };
}
 
Example 7
Source File: DiskExplorer.java    From AppleCommander with GNU General Public License v2.0 5 votes vote down vote up
private Color randomColor() {
	Color colors[] = {Color.black, Color.blue, Color.cyan,
		Color.gray, Color.darkGray, Color.green,
		Color.lightGray, Color.magenta, Color.orange,
		Color.pink,Color.red, Color.white, Color.yellow};
	return colors[(int)(Math.random() * colors.length)];
}
 
Example 8
Source File: StandardChartTheme.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates and returns a theme called "Darkness".  In this theme, the
 * charts have a black background.
 *
 * @return The "Darkness" theme.
 */
public static ChartTheme createDarknessTheme() {
    StandardChartTheme theme = new StandardChartTheme("Darkness");
    theme.titlePaint = Color.white;
    theme.subtitlePaint = Color.white;
    theme.legendBackgroundPaint = Color.black;
    theme.legendItemPaint = Color.white;
    theme.chartBackgroundPaint = Color.black;
    theme.plotBackgroundPaint = Color.black;
    theme.plotOutlinePaint = Color.yellow;
    theme.baselinePaint = Color.white;
    theme.crosshairPaint = Color.red;
    theme.labelLinkPaint = Color.lightGray;
    theme.tickLabelPaint = Color.white;
    theme.axisLabelPaint = Color.white;
    theme.shadowPaint = Color.darkGray;
    theme.itemLabelPaint = Color.white;
    theme.drawingSupplier = new DefaultDrawingSupplier(
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC"), Color.decode("0xFF0000"),
                    Color.decode("0xFFFF7F"), Color.decode("0x6681CC"),
                    Color.decode("0xFF7F7F"), Color.decode("0xFFFFBF"),
                    Color.decode("0x99A6CC"), Color.decode("0xFFBFBF"),
                    Color.decode("0xA9A938"), Color.decode("0x2D4587")},
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC")},
            new Stroke[] {new BasicStroke(2.0f)},
            new Stroke[] {new BasicStroke(0.5f)},
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    theme.wallPaint = Color.darkGray;
    theme.errorIndicatorPaint = Color.lightGray;
    theme.gridBandPaint = new Color(255, 255, 255, 20);
    theme.gridBandAlternatePaint = new Color(255, 255, 255, 40);
    theme.shadowGenerator = null;
    return theme;
}
 
Example 9
Source File: StandardChartTheme.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new default instance.
 *
 * @param name  the name of the theme (<code>null</code> not permitted).
 * @param shadow  a flag that controls whether a shadow generator is 
 *                included.
 *
 * @since 1.0.14
 */
public StandardChartTheme(String name, boolean shadow) {
    ParamChecks.nullNotPermitted(name, "name");
    this.name = name;
    this.extraLargeFont = new Font("Tahoma", Font.BOLD, 20);
    this.largeFont = new Font("Tahoma", Font.BOLD, 14);
    this.regularFont = new Font("Tahoma", Font.PLAIN, 12);
    this.smallFont = new Font("Tahoma", Font.PLAIN, 10);
    this.titlePaint = Color.black;
    this.subtitlePaint = Color.black;
    this.legendBackgroundPaint = Color.white;
    this.legendItemPaint = Color.darkGray;
    this.chartBackgroundPaint = Color.white;
    this.drawingSupplier = new DefaultDrawingSupplier();
    this.plotBackgroundPaint = Color.lightGray;
    this.plotOutlinePaint = Color.black;
    this.labelLinkPaint = Color.black;
    this.labelLinkStyle = PieLabelLinkStyle.CUBIC_CURVE;
    this.axisOffset = new RectangleInsets(4, 4, 4, 4);
    this.domainGridlinePaint = Color.white;
    this.rangeGridlinePaint = Color.white;
    this.baselinePaint = Color.black;
    this.crosshairPaint = Color.blue;
    this.axisLabelPaint = Color.darkGray;
    this.tickLabelPaint = Color.darkGray;
    this.barPainter = new GradientBarPainter();
    this.xyBarPainter = new GradientXYBarPainter();
    this.shadowVisible = false;
    this.shadowPaint = Color.gray;
    this.itemLabelPaint = Color.black;
    this.thermometerPaint = Color.white;
    this.wallPaint = BarRenderer3D.DEFAULT_WALL_PAINT;
    this.errorIndicatorPaint = Color.black;
    this.shadowGenerator = shadow ? new DefaultShadowGenerator() : null;
}
 
Example 10
Source File: StandardChartTheme.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates a new default instance.
 *
 * @param name  the name of the theme (<code>null</code> not permitted).
 * @param shadow  a flag that controls whether a shadow generator is 
 *                included.
 *
 * @since 1.0.14
 */
public StandardChartTheme(String name, boolean shadow) {
    ParamChecks.nullNotPermitted(name, "name");
    this.name = name;
    this.extraLargeFont = new Font("Tahoma", Font.BOLD, 20);
    this.largeFont = new Font("Tahoma", Font.BOLD, 14);
    this.regularFont = new Font("Tahoma", Font.PLAIN, 12);
    this.smallFont = new Font("Tahoma", Font.PLAIN, 10);
    this.titlePaint = Color.black;
    this.subtitlePaint = Color.black;
    this.legendBackgroundPaint = Color.white;
    this.legendItemPaint = Color.darkGray;
    this.chartBackgroundPaint = Color.white;
    this.drawingSupplier = new DefaultDrawingSupplier();
    this.plotBackgroundPaint = Color.lightGray;
    this.plotOutlinePaint = Color.black;
    this.labelLinkPaint = Color.black;
    this.labelLinkStyle = PieLabelLinkStyle.CUBIC_CURVE;
    this.axisOffset = new RectangleInsets(4, 4, 4, 4);
    this.domainGridlinePaint = Color.white;
    this.rangeGridlinePaint = Color.white;
    this.baselinePaint = Color.black;
    this.crosshairPaint = Color.blue;
    this.axisLabelPaint = Color.darkGray;
    this.tickLabelPaint = Color.darkGray;
    this.barPainter = new GradientBarPainter();
    this.xyBarPainter = new GradientXYBarPainter();
    this.shadowVisible = false;
    this.shadowPaint = Color.gray;
    this.itemLabelPaint = Color.black;
    this.thermometerPaint = Color.white;
    this.wallPaint = BarRenderer3D.DEFAULT_WALL_PAINT;
    this.errorIndicatorPaint = Color.black;
    this.shadowGenerator = shadow ? new DefaultShadowGenerator() : null;
}
 
Example 11
Source File: StandardChartTheme.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Creates and returns a theme called "Darkness".  In this theme, the
 * charts have a black background.
 *
 * @return The "Darkness" theme.
 */
public static ChartTheme createDarknessTheme() {
    StandardChartTheme theme = new StandardChartTheme("Darkness");
    theme.titlePaint = Color.white;
    theme.subtitlePaint = Color.white;
    theme.legendBackgroundPaint = Color.black;
    theme.legendItemPaint = Color.white;
    theme.chartBackgroundPaint = Color.black;
    theme.plotBackgroundPaint = Color.black;
    theme.plotOutlinePaint = Color.yellow;
    theme.baselinePaint = Color.white;
    theme.crosshairPaint = Color.red;
    theme.labelLinkPaint = Color.lightGray;
    theme.tickLabelPaint = Color.white;
    theme.axisLabelPaint = Color.white;
    theme.shadowPaint = Color.darkGray;
    theme.itemLabelPaint = Color.white;
    theme.drawingSupplier = new DefaultDrawingSupplier(
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC"), Color.decode("0xFF0000"),
                    Color.decode("0xFFFF7F"), Color.decode("0x6681CC"),
                    Color.decode("0xFF7F7F"), Color.decode("0xFFFFBF"),
                    Color.decode("0x99A6CC"), Color.decode("0xFFBFBF"),
                    Color.decode("0xA9A938"), Color.decode("0x2D4587")},
            new Paint[] {Color.decode("0xFFFF00"),
                    Color.decode("0x0036CC")},
            new Stroke[] {new BasicStroke(2.0f)},
            new Stroke[] {new BasicStroke(0.5f)},
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    theme.wallPaint = Color.darkGray;
    theme.errorIndicatorPaint = Color.lightGray;
    theme.gridBandPaint = new Color(255, 255, 255, 20);
    theme.gridBandAlternatePaint = new Color(255, 255, 255, 40);
    theme.shadowGenerator = null;
    return theme;
}
 
Example 12
Source File: ColorUtil.java    From MeteoInfo with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
     * Get common color
     *
     * @param idx Index
     * @return Common color
     */
    public static Color getCommonColor(int idx) {
//        if (idx == 0) {
//            idx = 1;
//        }
        if (idx > 11) {
            idx = idx % 11;
        }

        switch (idx) {
            case 0:
                return Color.red;
            case 1:
                return Color.blue;
            case 2:
                return Color.green;
            case 3:
                return Color.black;
            case 4:
                return Color.yellow;
            case 5:
                return Color.pink;
            case 6:
                return Color.gray;
            case 7:
                return Color.cyan;
            case 8:
                return Color.magenta;
            case 9:
                return Color.orange;
            case 10:
                return Color.darkGray;
            case 11:
                return Color.lightGray;
        }

        return Color.red;
    }
 
Example 13
Source File: ChartColor.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Convenience method to return an array of <code>Paint</code> objects that
 * represent the pre-defined colors in the <code>Color</code> and
 * <code>ChartColor</code> objects.
 *
 * @return An array of objects with the <code>Paint</code> interface.
 */
public static Paint[] createDefaultPaintArray() {

    return new Paint[] {
        new Color(0xFF, 0x55, 0x55),
        new Color(0x55, 0x55, 0xFF),
        new Color(0x55, 0xFF, 0x55),
        new Color(0xFF, 0xFF, 0x55),
        new Color(0xFF, 0x55, 0xFF),
        new Color(0x55, 0xFF, 0xFF),
        Color.pink,
        Color.gray,
        ChartColor.DARK_RED,
        ChartColor.DARK_BLUE,
        ChartColor.DARK_GREEN,
        ChartColor.DARK_YELLOW,
        ChartColor.DARK_MAGENTA,
        ChartColor.DARK_CYAN,
        Color.darkGray,
        ChartColor.LIGHT_RED,
        ChartColor.LIGHT_BLUE,
        ChartColor.LIGHT_GREEN,
        ChartColor.LIGHT_YELLOW,
        ChartColor.LIGHT_MAGENTA,
        ChartColor.LIGHT_CYAN,
        Color.lightGray,
        ChartColor.VERY_DARK_RED,
        ChartColor.VERY_DARK_BLUE,
        ChartColor.VERY_DARK_GREEN,
        ChartColor.VERY_DARK_YELLOW,
        ChartColor.VERY_DARK_MAGENTA,
        ChartColor.VERY_DARK_CYAN,
        ChartColor.VERY_LIGHT_RED,
        ChartColor.VERY_LIGHT_BLUE,
        ChartColor.VERY_LIGHT_GREEN,
        ChartColor.VERY_LIGHT_YELLOW,
        ChartColor.VERY_LIGHT_MAGENTA,
        ChartColor.VERY_LIGHT_CYAN
    };
}
 
Example 14
Source File: WreckSprite.java    From megamek with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates the sprite for this entity. It is an extra pain to create
 * transparent images in AWT.
 */
@Override
public void prepare() {
    // figure out size
    String shortName = entity.getShortName();
    Font font = new Font("SansSerif", Font.PLAIN, 10); //$NON-NLS-1$
    Rectangle tempRect = new Rectangle(47, 55, bv.getFontMetrics(font)
            .stringWidth(shortName) + 1, bv.getFontMetrics(font)
            .getAscent());

    // create image for buffer
    image = ImageUtil.createAcceleratedImage(bounds.width, bounds.height);
    Graphics graph = image.getGraphics();

    // Draw wreck image,if we've got one.
    Image wreck = bv.tileManager.wreckMarkerFor(entity, -1);
    if (null != wreck) {
        graph.drawImage(wreck, 0, 0, this);
    }

    if ((secondaryPos == -1) && GUIPreferences.getInstance()
            .getBoolean(GUIPreferences.ADVANCED_DRAW_ENTITY_LABEL)) {
        // draw box with shortName
        Color text = Color.lightGray;
        Color bkgd = Color.darkGray;
        Color bord = Color.black;

        graph.setFont(font);
        graph.setColor(bord);
        graph.fillRect(tempRect.x, tempRect.y, tempRect.width,
                tempRect.height);
        tempRect.translate(-1, -1);
        graph.setColor(bkgd);
        graph.fillRect(tempRect.x, tempRect.y, tempRect.width,
                tempRect.height);
        graph.setColor(text);
        graph.drawString(shortName, tempRect.x + 1,
                (tempRect.y + tempRect.height) - 1);
    }

    // create final image
    image = bv.getScaledImage(image, false);
    graph.dispose();
}
 
Example 15
Source File: EIsotopePatternChartTheme.java    From mzmine3 with GNU General Public License v2.0 4 votes vote down vote up
public void initialize() {
  // Fonts
  this.setExtraLargeFont(new Font("Arial", Font.BOLD, 16));
  this.setLargeFont(new Font("Arial", Font.BOLD, 11));
  this.setRegularFont(new Font("Arial", Font.PLAIN, 11));
  this.setSmallFont(new Font("Arial", Font.PLAIN, 11));

  // paints
  this.setTitlePaint(Color.black);
  this.setSubtitlePaint(Color.black);
  this.setLegendItemPaint(Color.black);
  this.setPlotOutlinePaint(Color.black);
  this.setBaselinePaint(Color.black);
  this.setCrosshairPaint(Color.black);
  this.setLabelLinkPaint(Color.black);
  this.setTickLabelPaint(Color.black);
  this.setAxisLabelPaint(Color.black);
  this.setShadowPaint(Color.black);
  this.setItemLabelPaint(Color.black);

  this.setLegendBackgroundPaint(Color.white);
  this.setChartBackgroundPaint(Color.white);
  this.setPlotBackgroundPaint(Color.white);

  Paint[] colors = new Paint[] {Color.BLACK, new Color(0xFF, 0x55, 0x55),
      new Color(0x55, 0x55, 0xFF), new Color(0x55, 0xFF, 0x55), new Color(0xFF, 0xFF, 0x55),
      new Color(0xFF, 0x55, 0xFF), new Color(0x55, 0xFF, 0xFF), Color.pink, Color.gray,
      ChartColor.DARK_RED, ChartColor.DARK_BLUE, ChartColor.DARK_GREEN, ChartColor.DARK_YELLOW,
      ChartColor.DARK_MAGENTA, ChartColor.DARK_CYAN, Color.darkGray, ChartColor.LIGHT_RED,
      ChartColor.LIGHT_BLUE, ChartColor.LIGHT_GREEN, ChartColor.LIGHT_YELLOW,
      ChartColor.LIGHT_MAGENTA, ChartColor.LIGHT_CYAN, Color.lightGray, ChartColor.VERY_DARK_RED,
      ChartColor.VERY_DARK_BLUE, ChartColor.VERY_DARK_GREEN, ChartColor.VERY_DARK_YELLOW,
      ChartColor.VERY_DARK_MAGENTA, ChartColor.VERY_DARK_CYAN, ChartColor.VERY_LIGHT_RED,
      ChartColor.VERY_LIGHT_BLUE, ChartColor.VERY_LIGHT_GREEN, ChartColor.VERY_LIGHT_YELLOW,
      ChartColor.VERY_LIGHT_MAGENTA, ChartColor.VERY_LIGHT_CYAN};

  this.setDrawingSupplier(
      new DefaultDrawingSupplier(colors, DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));

  this.setRangeGridlinePaint(Color.GRAY);
  this.setDomainGridlinePaint(Color.GRAY);

  this.setAxisLinePaint(Color.black);
}
 
Example 16
Source File: RegionSelectionHandler.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Creates a new default instance.
 */
public RegionSelectionHandler() {
    this(new BasicStroke(1.0f), Color.darkGray, new Color(255, 0, 255, 50));
}
 
Example 17
Source File: ChartThemeFactory.java    From mzmine2 with GNU General Public License v2.0 4 votes vote down vote up
public static EStandardChartTheme createBlackNWhiteTheme() {
  EStandardChartTheme theme = new EStandardChartTheme(THEME.BNW_PRINT, "BnW");
  // Fonts
  theme.setExtraLargeFont(new Font("Arial", Font.BOLD, 16));
  theme.setLargeFont(new Font("Arial", Font.BOLD, 11));
  theme.setRegularFont(new Font("Arial", Font.PLAIN, 11));
  theme.setSmallFont(new Font("Arial", Font.PLAIN, 11));

  // Paints
  theme.setTitlePaint(Color.black);
  theme.setSubtitlePaint(Color.black);
  theme.setLegendItemPaint(Color.black);
  theme.setPlotOutlinePaint(Color.black);
  theme.setBaselinePaint(Color.black);
  theme.setCrosshairPaint(Color.black);
  theme.setLabelLinkPaint(Color.black);
  theme.setTickLabelPaint(Color.black);
  theme.setAxisLabelPaint(Color.black);
  theme.setShadowPaint(Color.black);
  theme.setItemLabelPaint(Color.black);

  theme.setLegendBackgroundPaint(Color.white);
  theme.setChartBackgroundPaint(Color.white);
  theme.setPlotBackgroundPaint(Color.white);

  // paint sequence: add black
  Paint[] colors = new Paint[] {Color.BLACK, new Color(0xFF, 0x55, 0x55),
      new Color(0x55, 0x55, 0xFF), new Color(0x55, 0xFF, 0x55), new Color(0xFF, 0xFF, 0x55),
      new Color(0xFF, 0x55, 0xFF), new Color(0x55, 0xFF, 0xFF), Color.pink, Color.gray,
      ChartColor.DARK_RED, ChartColor.DARK_BLUE, ChartColor.DARK_GREEN, ChartColor.DARK_YELLOW,
      ChartColor.DARK_MAGENTA, ChartColor.DARK_CYAN, Color.darkGray, ChartColor.LIGHT_RED,
      ChartColor.LIGHT_BLUE, ChartColor.LIGHT_GREEN, ChartColor.LIGHT_YELLOW,
      ChartColor.LIGHT_MAGENTA, ChartColor.LIGHT_CYAN, Color.lightGray, ChartColor.VERY_DARK_RED,
      ChartColor.VERY_DARK_BLUE, ChartColor.VERY_DARK_GREEN, ChartColor.VERY_DARK_YELLOW,
      ChartColor.VERY_DARK_MAGENTA, ChartColor.VERY_DARK_CYAN, ChartColor.VERY_LIGHT_RED,
      ChartColor.VERY_LIGHT_BLUE, ChartColor.VERY_LIGHT_GREEN, ChartColor.VERY_LIGHT_YELLOW,
      ChartColor.VERY_LIGHT_MAGENTA, ChartColor.VERY_LIGHT_CYAN};

  theme.setDrawingSupplier(
      new DefaultDrawingSupplier(colors, DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));
  theme.setErrorIndicatorPaint(Color.black);
  theme.setGridBandPaint(new Color(255, 255, 255, 20));
  theme.setGridBandAlternatePaint(new Color(255, 255, 255, 40));

  // axis
  Color transp = new Color(0, 0, 0, 200);
  theme.setRangeGridlinePaint(transp);
  theme.setDomainGridlinePaint(transp);

  theme.setAxisLinePaint(Color.black);

  // axis offset
  theme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));

  return theme;
}
 
Example 18
Source File: PulsingCirclesThrobberUI.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public Color getDefaultForeground() {
	return Color.darkGray;
}
 
Example 19
Source File: ChartThemeFactory.java    From old-mzmine3 with GNU General Public License v2.0 4 votes vote down vote up
public static EStandardChartTheme createBlackNWhiteTheme() {
  EStandardChartTheme theme = new EStandardChartTheme(THEME.BNW_PRINT, "BnW");
  // Fonts
  theme.setExtraLargeFont(new Font("Arial", Font.BOLD, 16));
  theme.setLargeFont(new Font("Arial", Font.BOLD, 11));
  theme.setRegularFont(new Font("Arial", Font.PLAIN, 11));
  theme.setSmallFont(new Font("Arial", Font.PLAIN, 11));

  // Paints
  theme.setTitlePaint(Color.black);
  theme.setSubtitlePaint(Color.black);
  theme.setLegendItemPaint(Color.black);
  theme.setPlotOutlinePaint(Color.black);
  theme.setBaselinePaint(Color.black);
  theme.setCrosshairPaint(Color.black);
  theme.setLabelLinkPaint(Color.black);
  theme.setTickLabelPaint(Color.black);
  theme.setAxisLabelPaint(Color.black);
  theme.setShadowPaint(Color.black);
  theme.setItemLabelPaint(Color.black);

  theme.setLegendBackgroundPaint(Color.white);
  theme.setChartBackgroundPaint(Color.white);
  theme.setPlotBackgroundPaint(Color.white);

  // paint sequence: add black
  Paint[] colors = new Paint[] {Color.BLACK, new Color(0xFF, 0x55, 0x55),
      new Color(0x55, 0x55, 0xFF), new Color(0x55, 0xFF, 0x55), new Color(0xFF, 0xFF, 0x55),
      new Color(0xFF, 0x55, 0xFF), new Color(0x55, 0xFF, 0xFF), Color.pink, Color.gray,
      ChartColor.DARK_RED, ChartColor.DARK_BLUE, ChartColor.DARK_GREEN, ChartColor.DARK_YELLOW,
      ChartColor.DARK_MAGENTA, ChartColor.DARK_CYAN, Color.darkGray, ChartColor.LIGHT_RED,
      ChartColor.LIGHT_BLUE, ChartColor.LIGHT_GREEN, ChartColor.LIGHT_YELLOW,
      ChartColor.LIGHT_MAGENTA, ChartColor.LIGHT_CYAN, Color.lightGray, ChartColor.VERY_DARK_RED,
      ChartColor.VERY_DARK_BLUE, ChartColor.VERY_DARK_GREEN, ChartColor.VERY_DARK_YELLOW,
      ChartColor.VERY_DARK_MAGENTA, ChartColor.VERY_DARK_CYAN, ChartColor.VERY_LIGHT_RED,
      ChartColor.VERY_LIGHT_BLUE, ChartColor.VERY_LIGHT_GREEN, ChartColor.VERY_LIGHT_YELLOW,
      ChartColor.VERY_LIGHT_MAGENTA, ChartColor.VERY_LIGHT_CYAN};

  theme.setDrawingSupplier(
      new DefaultDrawingSupplier(colors, DefaultDrawingSupplier.DEFAULT_FILL_PAINT_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
          DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));
  theme.setErrorIndicatorPaint(Color.black);
  theme.setGridBandPaint(new Color(255, 255, 255, 20));
  theme.setGridBandAlternatePaint(new Color(255, 255, 255, 40));

  // axis
  Color transp = new Color(0, 0, 0, 200);
  theme.setRangeGridlinePaint(transp);
  theme.setDomainGridlinePaint(transp);

  theme.setAxisLinePaint(Color.black);

  // axis offset
  theme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));

  return theme;
}
 
Example 20
Source File: ChasingArrowsThrobberUI.java    From pumpernickel with MIT License 4 votes vote down vote up
@Override
public Color getDefaultForeground() {
	return Color.darkGray;
}