Examples of Color


Examples of org.apache.isis.applib.value.Color

    private Color color;
    private FacetHolder holder;

    @Before
    public void setUpObjects() throws Exception {
        color = new Color(0x3366ff);
        allowMockAdapterToReturn(color);
        holder = new FacetHolderImpl();

        setValue(value = new ColorValueSemanticsProvider(holder, mockConfiguration, mockContext));
    }
View Full Code Here

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

    }

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

        Color color = getState().isObjectIdentified() ? Toolkit.getColor("primary2") : Toolkit.getColor("secondary1");
        Size size = getSize();
        int width = size.getWidth();
        int height = size.getHeight();
        canvas.drawRectangle(0, 0, width - 1, height - 1, color);
View Full Code Here

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

Examples of org.apache.metamodel.data.Style.Color

            if (sizeUnit == SizeUnit.PERCENT) {
              fontSize = convertFontPercentageToPt(fontSize);
            }
            font.get().setFontHeightInPoints(fontSize.shortValue());
          }
          Color foregroundColor = style.getForegroundColor();
          if (foregroundColor != null) {
            short index = getUpdateCallback().getColorIndex(
                foregroundColor);
            font.get().setColor(index);
          }
          if (font.isFetched()) {
            cellStyle.get().setFont(font.get());
          }
          if (style.getAlignment() != null) {
            cellStyle.get().setAlignment(
                getAlignment(style.getAlignment()));
          }

          final Color backgroundColor = style.getBackgroundColor();
          if (backgroundColor != null) {
            cellStyle.get().setFillPattern(
                CellStyle.SOLID_FOREGROUND);
            cellStyle.get().setFillForegroundColor(
                getUpdateCallback().getColorIndex(
View Full Code Here

Examples of org.apache.openejb.test.object.Color

/*  Enum                                           */
/*-------------------------------------------------*/

    public void test60_returnColor() {
        try {
            final Color expected = Color.GREEN;

            final Color actual = (Color) PortableRemoteObject.narrow(ejbObject.returnColor(expected), Color.class);

            assertNotNull("The Color returned is null", actual);

            assertEquals(expected, actual);

View Full Code Here

Examples of org.apache.poi.ss.usermodel.Color

            throw new IllegalStateException("Unexpected font type: " + (font == null ? "null" : font.getClass()) + ")");
        }

        // Background color
        if (cellStyle.getFillPattern() == 1) {
            Color color = cellStyle.getFillForegroundColorColor();
            if (color instanceof HSSFColor) {
                short[] triplet = ((HSSFColor) color).getTriplet();
                if (triplet != null) {
                    styleBuilder.background(triplet);
                }
            } else if (color instanceof XSSFColor) {
                String argb = ((XSSFColor) color).getARGBHex();
                if (argb != null) {
                    styleBuilder.background(argb.substring(2));
                }
            } else {
                throw new IllegalStateException("Unexpected color type: " + (color == null ? "null" : color.getClass()) + ")");
            }
        }

        // alignment
        switch (cellStyle.getAlignment()) {
View Full Code Here

Examples of org.apache.tuscany.sca.binding.corba.testing.enums.Color

            DynaCorbaServant servant = new DynaCorbaServant(proxy, Utils.getTypeId(javaClass));
            String[] ids = {"IDL:org/apache/tuscany/sca/binding/corba/testing/enums/EnumManager:1.0"};
            servant.setIds(ids);
            bindServant(servant, "Enum");
            EnumManager em = EnumManagerHelper.narrow(bindReference("Enum"));
            Color color = Color.red;
            assertTrue(em.getColor(color).value() == color.value());
        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.test.corba.generated.Color

    private static final long serialVersionUID = 1L;

    public TRichStruct setRichStruct(TRichStruct richStruct) throws WrongColor, UnexpectedException {
        if (richStruct.innerStruct.color.value() == Color.red.value()) {
            Color translatedColor = Color.from_int(richStruct.innerStruct.color.value());
            throw new WrongColor(translatedColor, Color.green);
        } else if (richStruct.longField == 0) {
            throw new UnexpectedException("Expected richStruct.longField != 0");
        }
        return richStruct;
View Full Code Here

Examples of org.bukkit.Color

          }
        }
      }
      if (config.contains(prefix + "armorcolor")) {
        int rgb = config.getInt(prefix + "armorcolor");
        Color clr = Color.fromRGB(rgb);
        LeatherArmorMeta meta = (LeatherArmorMeta) stack.getItemMeta();
        meta.setColor(clr);
        stack.setItemMeta(meta);
      }
      if (config.contains(prefix + "name")) {
View Full Code Here

Examples of org.crsh.text.Color

          termIO.setUnderlined(composite.getUnderline());
        }
        if (composite.getBlink() != null) {
          termIO.setBlink(composite.getBlink());
        }
        Color fg = composite.getForeground();
        if (fg != null) {
          termIO.setForegroundColor(30 + fg.code);
        }
        Color bg = composite.getBackground();
        if (bg != null) {
          termIO.setBackgroundColor(30 + bg.code);
        }
      } else {
        termIO.resetAttributes();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.