Package org.apache.isis.viewer.dnd.drawing

Examples of org.apache.isis.viewer.dnd.drawing.Color


        final int height = requiredSize.getHeight();
        final int left = 0, top = 0;
        final int right = 10 + width - 1 + 10;
        final int bottom = 10 + height - 1 + 10;

        Color gray = Toolkit.getColor(0xcccccc);
        // horizontal lines
        canvas.drawLine(left, top + 10, right, top + 10, gray);
        canvas.drawLine(left, bottom - 10, right, bottom - 10, gray);

        // vertical lines
View Full Code Here


    public void draw(final Canvas canvas) {
        super.draw(canvas);

        final Text titleStyle = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
        final Text normalStyle = Toolkit.getText(ColorsAndFonts.TEXT_LABEL);
        final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);

        clearBackground(canvas, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
        canvas.drawRectangleAround(getBounds(), Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));

        if (showingImage()) {
View Full Code Here

        final int xEntent = getSize().getWidth() - 1;
        final int yExtent = getSize().getHeight() - 1;

        final int arc = 9;
        canvas.drawSolidRectangle(x + 2, y + 2, xEntent - 4, yExtent - 4, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
        final Color black = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
        canvas.drawRoundedRectangle(x, y++, xEntent, yExtent, arc, arc, black);
        canvas.drawRoundedRectangle(x + 1, y++, xEntent - 2, yExtent - 2, arc, arc, Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2));
        canvas.drawRoundedRectangle(x + 2, y++, xEntent - 4, yExtent - 4, arc, arc, black);

        x += 10;
View Full Code Here

        if (((CollectionContent) getContent()).getOrderByElement()) {
            drawOrderIndicator(canvas, axis, x - 10);
        }

        final Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
        canvas.drawLine(0, 0, getSize().getWidth() - 1, 0, secondary1);
        canvas.drawLine(0, height - 1, getSize().getWidth() - 1, height - 1, secondary1);
        canvas.drawLine(x, 0, x, getSize().getHeight() - 1, secondary1);
        x++;
        final int columns = axis.getColumnCount();
View Full Code Here

        title.draw(subcanvas, offset, baseline, getLeft() - offset);

        final int columns = axis.getColumnCount();
        int x = -1;
        x += axis.getHeaderOffset();
        final Color secondary1 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY1);
        canvas.drawLine(x - 1, 0, x - 1, s.getHeight() - 1, secondary1);
        canvas.drawLine(x, 0, x, s.getHeight() - 1, secondary1);
        for (int i = 0; i < columns; i++) {
            x += axis.getColumnWidth(i);
            canvas.drawLine(x, 0, x, s.getHeight() - 1, secondary1);
        }
        canvas.drawLine(0, 0, 0, s.getHeight() - 1, secondary1);

        final int y = s.getHeight() - 1;
        final Color secondary2 = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);
        canvas.drawLine(0, y, s.getWidth(), y, secondary2);

        if (getState().isObjectIdentified()) {
            final int xExtent = width - 1;
            canvas.drawLine(xExtent - BORDER, top, xExtent - BORDER, top + s.getHeight() - 1, secondary2);
View Full Code Here

    public static Color getColor(final int rgbColor) {
        return getInstance().colorsAndFonts.getColor(rgbColor);
    }

    public static Color getColor(final String name) {
        final Color color = getInstance().colorsAndFonts.getColor(name);
        if (color == null) {
            throw new IsisException("No such color: " + name);
        }
        return color;
    }
View Full Code Here

        icon.draw(canvas, 0, getBaseline());

        final ObjectAdapter collection = getContent().getAdapter();
        final CollectionFacet facet = CollectionFacetUtils.getCollectionFacetFromSpec(collection);
        final ViewState state = getState();
        final Color color;
        if (state.canDrop()) {
            color = Toolkit.getColor(ColorsAndFonts.COLOR_VALID);
        } else if (state.cantDrop()) {
            color = Toolkit.getColor(ColorsAndFonts.COLOR_INVALID);
        } else {
View Full Code Here

    public void draw(final Canvas canvas) {
        super.draw(canvas);
        int y = 0;
        final int height = (getSize().getHeight() - 5) / histogramAxis.getNoBars();
        final Text text = Toolkit.getText(ColorsAndFonts.TEXT_LABEL);
        final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_PRIMARY1);
        canvas.drawText(getContent().title(), 0, height / 2 + text.getAscent() / 2, color, text);

        for (int i = 0; i < histogramAxis.getNoBars(); i++) {
            final double length = (getSize().getWidth() - 160) * histogramAxis.getLengthFor(getContent(), i);
            canvas.drawSolidRectangle(160, y, (int) length, height, Toolkit.getColor(colors[i % colors.length]));
View Full Code Here

    @Override
    public void draw(final Canvas canvas) {
        final int width = getSize().getWidth();
        final int height = getSize().getHeight();

        final Color secondaryTextColor = Toolkit.getColor(ColorsAndFonts.COLOR_WHITE);
        final Color mainTextColor = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);

        drawBackground(canvas, width, height);
        drawDaysOfWeek(canvas, secondaryTextColor);
        if (isEditable) {
            drawDayMarker(canvas);
View Full Code Here

    private void drawControl(final Canvas canvas, final int x, final int y, final int width, final int height, final String label, final int over) {
        if (Toolkit.debug) {
            canvas.drawRectangle(x - 2, y, width + 4, height, Toolkit.getColor(ColorsAndFonts.COLOR_DEBUG_BOUNDS_VIEW));
        }
        final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY2);

        final int arrowHeight = width / 2;
        final Shape upArrow = new Shape(0, arrowHeight);
        upArrow.addVector(arrowHeight, -arrowHeight);
        upArrow.addVector(arrowHeight, arrowHeight);
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.drawing.Color

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.