Examples of Border


Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

    final long halfBorderWidth = sblp.getBorderLeft() / 2;
    final long x = this.x;
    final long y = this.y;
    final long h = this.height;

    final Border border = boxDefinition.getBorder();
    final long topLeftWidth = border.getTopLeft().getWidth();
    final long topLeftHeight = border.getTopLeft().getHeight();
    final long bottomLeftWidth = border.getBottomLeft().getWidth();
    final long bottomLeftHeight = border.getBottomLeft().getHeight();

    if (bottomLeftWidth == 0 && topLeftWidth == 0 && bottomLeftHeight == 0 && topLeftHeight == 0)
    {
      // Make a square corner
      final double lineX = StrictGeomUtility.toExternalValue(x + halfBorderWidth);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

    final long x = this.x;
    final long y = this.y;
    final long w = this.width;
    final long h = this.height;

    final Border border = boxDefinition.getBorder();
    final long topRightWidth = border.getTopRight().getWidth();
    final long topRightHeight = border.getTopRight().getHeight();
    final long bottomRightWidth = border.getBottomRight().getWidth();
    final long bottomRightHeight = border.getBottomRight().getHeight();

    if (topRightWidth == 0 && bottomRightWidth == 0 && topRightHeight == 0 && bottomRightHeight == 0)
    {
      // Make a square corner
      final double lineX = StrictGeomUtility.toExternalValue(x + w - halfBorderWidth);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

  private AttributeList createBoxAttributeList(final RenderBox box)
  {
    final AttributeList attributeList = new AttributeList();
    final BoxDefinition definition = box.getBoxDefinition();
    final Border border = definition.getBorder();
    final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();

    final BorderEdge top = border.getTop();
    if (BorderEdge.EMPTY.equals(top) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-color",
          convertColorToString(top));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderTop())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-style",
          String.valueOf(top.getBorderStyle()));
    }

    final BorderEdge left = border.getLeft();
    if (BorderEdge.EMPTY.equals(left) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-left-color",
          convertColorToString(left));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-left-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderLeft())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-left-style",
          String.valueOf(left.getBorderStyle()));
    }

    final BorderEdge bottom = border.getBottom();
    if (BorderEdge.EMPTY.equals(bottom) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-color",
          convertColorToString(bottom));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderBottom())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-style",
          String.valueOf(bottom.getBorderStyle()));
    }

    final BorderEdge right = border.getRight();
    if (BorderEdge.EMPTY.equals(right) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-right-color",
          convertColorToString(right));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-right-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderRight())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-right-style",
          String.valueOf(right.getBorderStyle()));
    }

    final BorderCorner topLeft = border.getTopLeft();
    if (isEmptyCorner(topLeft) == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-left-x",
          String.valueOf(StrictGeomUtility.toExternalValue(topLeft.getWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-left-y",
          String.valueOf(StrictGeomUtility.toExternalValue(topLeft.getHeight())));
    }

    final BorderCorner topRight = border.getTopRight();
    if (isEmptyCorner(topRight) == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-right-x",
          String.valueOf(StrictGeomUtility.toExternalValue(topRight.getWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-top-right-y",
          String.valueOf(StrictGeomUtility.toExternalValue(topRight.getHeight())));
    }

    final BorderCorner bottomLeft = border.getBottomLeft();
    if (isEmptyCorner(bottomLeft) == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-left-x",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomLeft.getWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-left-y",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomLeft.getHeight())));
    }

    final BorderCorner bottomRight = border.getBottomRight();
    if (isEmptyCorner(bottomRight) == false)
    {
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-right-x",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomRight.getWidth())));
      attributeList.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "border-bottom-right-y",
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

  }


  private void paint(final Graphics2D g2d)
  {
    final Border border = boxDefinition.getBorder();
    if (backgroundColor == null && border.isEmpty())
    {
      return;
    }


    final Color oldColor = g2d.getColor();
    final Stroke oldStroke = g2d.getStroke();

    if (isSameForAllSides())
    {
      final Shape borderShape = getBorderShape();

      if (backgroundColor != null)
      {
        g2d.setColor(backgroundColor);
        g2d.fill(borderShape);
      }

      if (staticBoxLayoutProperties.getBorderTop() > 0)
      {
        final BorderEdge borderEdge = border.getTop();

        final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderTop());
        if (basicStroke != null)
        {
          g2d.setColor(borderEdge.getColor());
          g2d.setStroke(basicStroke);
          g2d.draw(borderShape);
        }
      }
      g2d.setColor(oldColor);
      g2d.setStroke(oldStroke);
      return;
    }


    if (backgroundColor != null)
    {
      final Shape borderShape = getBorderShape();
      g2d.setColor(backgroundColor);
      g2d.fill(borderShape);
    }

    final StaticBoxLayoutProperties sblp = this.staticBoxLayoutProperties;
    if (sblp.getBorderTop() > 0)
    {
      final BorderEdge borderEdge = border.getTop();
      final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderTop());
      if (basicStroke != null)
      {
        g2d.setColor(borderEdge.getColor());
        g2d.setStroke(basicStroke);
        g2d.draw(getBorderTopShape());
      }
    }

    if (sblp.getBorderRight() > 0)
    {
      final BorderEdge borderEdge = border.getRight();
      final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderRight());
      if (basicStroke != null)
      {
        g2d.setColor(borderEdge.getColor());
        g2d.setStroke(basicStroke);
        g2d.draw(getBorderRightShape());
      }
    }

    if (sblp.getBorderBottom() > 0)
    {
      final BorderEdge borderEdge = border.getBottom();
      final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderBottom());
      if (basicStroke != null)
      {
        g2d.setColor(borderEdge.getColor());
        g2d.setStroke(basicStroke);
        g2d.draw(getBorderBottomShape());
      }
    }

    if (sblp.getBorderLeft() > 0)
    {
      final BorderEdge borderEdge = border.getLeft();
      final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderLeft());
      if (basicStroke != null)
      {
        g2d.setColor(borderEdge.getColor());
        g2d.setStroke(basicStroke);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

    final long x = this.x + (sblp.getBorderLeft() / 2);
    final long y = this.y + (sblp.getBorderTop() / 2);
    final long w = this.width - ((sblp.getBorderLeft() + sblp.getBorderRight()) / 2);
    final long h = this.height - ((sblp.getBorderTop() + sblp.getBorderBottom()) / 2);

    final Border border = boxDefinition.getBorder();
    final long topLeftWidth = border.getTopLeft().getWidth();
    final long topLeftHeight = border.getTopLeft().getHeight();
    final long topRightWidth;
    final long topRightHeight;
    final long bottomLeftWidth;
    final long bottomLeftHeight;
    final long bottomRightWidth;
    final long bottomRightHeight;
    if (isSameForAllSides())
    {
      topRightWidth = topLeftWidth;
      topRightHeight = topLeftHeight;
      bottomLeftWidth = topLeftWidth;
      bottomLeftHeight = topLeftHeight;
      bottomRightWidth = topLeftWidth;
      bottomRightHeight = topLeftHeight;
    }
    else
    {
      topRightWidth = border.getTopRight().getWidth();
      topRightHeight = border.getTopRight().getHeight();
      bottomLeftWidth = border.getBottomLeft().getWidth();
      bottomLeftHeight = border.getBottomLeft().getHeight();
      bottomRightWidth = border.getBottomRight().getWidth();
      bottomRightHeight = border.getBottomRight().getHeight();
    }

    if (topLeftHeight == 0 && topRightHeight == 0 && topLeftWidth == 0 && topRightWidth == 0 &&
        bottomLeftHeight == 0 && bottomRightHeight == 0 && bottomLeftWidth == 0 && bottomRightWidth == 0)
    {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

  private static CellBackground applyBorder(final RenderBox content,
                                     CellBackground retval,
                                     final int backgroundHint)
  {
    final Border border = content.getBoxDefinition().getBorder();
    if (border.isEmpty())
    {
      return retval;
    }

    if ((backgroundHint & BACKGROUND_TOP) == BACKGROUND_TOP)
    {
      final BorderEdge borderEdgeTop = border.getTop();
      if (borderEdgeTop.isEmpty() == false)
      {
        if (retval == null)
        {
          retval = new CellBackground();
        }
        retval.setTop(borderEdgeTop);
      }
    }

    if ((backgroundHint & BACKGROUND_LEFT) == BACKGROUND_LEFT)
    {
      final BorderEdge borderEdgeLeft = border.getLeft();
      if (borderEdgeLeft.isEmpty() == false)
      {
        if (retval == null)
        {
          retval = new CellBackground();
        }
        retval.setLeft(borderEdgeLeft);
      }
    }

    if ((backgroundHint & BACKGROUND_BOTTOM) == BACKGROUND_BOTTOM)
    {
      final BorderEdge borderEdgeBottom = border.getBottom();
      if (borderEdgeBottom.isEmpty() == false)
      {
        if (retval == null)
        {
          retval = new CellBackground();
        }
        retval.setBottom(borderEdgeBottom);
      }
    }

    if ((backgroundHint & BACKGROUND_RIGHT) == BACKGROUND_RIGHT)
    {
      final BorderEdge borderEdgeRight = border.getRight();
      if (borderEdgeRight.isEmpty() == false)
      {
        if (retval == null)
        {
          retval = new CellBackground();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.Border

  private AttributeList createBoxAttributeList(final RenderBox box)
  {
    final AttributeList attributeList = new AttributeList();
    final BoxDefinition definition = box.getBoxDefinition();
    final Border border = definition.getBorder();
    final StaticBoxLayoutProperties sblp = box.getStaticBoxLayoutProperties();

    final BorderEdge top = border.getTop();
    if (BorderEdge.EMPTY.equals(top) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-color",
          ColorValueConverter.colorToString(top.getColor()));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderTop())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-style",
          String.valueOf(top.getBorderStyle()));
    }

    final BorderEdge left = border.getLeft();
    if (BorderEdge.EMPTY.equals(left) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-left-color",
          ColorValueConverter.colorToString(left.getColor()));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-left-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderLeft())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-left-style",
          String.valueOf(left.getBorderStyle()));
    }

    final BorderEdge bottom = border.getBottom();
    if (BorderEdge.EMPTY.equals(bottom) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-color",
          ColorValueConverter.colorToString(bottom.getColor()));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderBottom())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-style",
          String.valueOf(bottom.getBorderStyle()));
    }

    final BorderEdge right = border.getRight();
    if (BorderEdge.EMPTY.equals(right) == false || ignoreEmptyBorders == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-right-color",
          ColorValueConverter.colorToString(right.getColor()));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-right-width",
          String.valueOf(StrictGeomUtility.toExternalValue(sblp.getBorderRight())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-right-style",
          String.valueOf(right.getBorderStyle()));
    }

    final BorderCorner topLeft = border.getTopLeft();
    if (isEmptyCorner(topLeft) == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-left-x",
          String.valueOf(StrictGeomUtility.toExternalValue(topLeft.getWidth())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-left-y",
          String.valueOf(StrictGeomUtility.toExternalValue(topLeft.getHeight())));
    }

    final BorderCorner topRight = border.getTopRight();
    if (isEmptyCorner(topRight) == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-right-x",
          String.valueOf(StrictGeomUtility.toExternalValue(topRight.getWidth())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-top-right-y",
          String.valueOf(StrictGeomUtility.toExternalValue(topRight.getHeight())));
    }

    final BorderCorner bottomLeft = border.getBottomLeft();
    if (isEmptyCorner(bottomLeft) == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-left-x",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomLeft.getWidth())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-left-y",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomLeft.getHeight())));
    }

    final BorderCorner bottomRight = border.getBottomRight();
    if (isEmptyCorner(bottomRight) == false)
    {
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-right-x",
          String.valueOf(StrictGeomUtility.toExternalValue(bottomRight.getWidth())));
      attributeList.setAttribute(LAYOUT_OUTPUT_NAMESPACE, "border-bottom-right-y",
View Full Code Here

Examples of org.terasology.math.Border

    }

    @Override
    public Border deserialize(PersistedData data, DeserializationContext context) {
        PersistedDataMap map = data.getAsValueMap();
        return new Border(map.getAsInteger(LEFT_FIELD), map.getAsInteger(RIGHT_FIELD), map.getAsInteger(TOP_FIELD), map.getAsInteger(BOTTOM_FIELD));
    }
View Full Code Here

Examples of org.wicketstuff.artwork.liquidcanvas.graphics.Border

   */
    public LiquidExamplePage(final PageParameters parameters) {
      super(parameters);

      Graphics g=new Shadow();
      g.setChainedGraphics(new Border()).setChainedGraphics(new Gradient());
      LiquidCanvasBehavior liquidCanvasBehaviorOne=new LiquidCanvasBehavior(g,new RoundedRect());
     
      WebMarkupContainer liquidOneExample=new WebMarkupContainer("LiquidOne");
      liquidOneExample.add(liquidCanvasBehaviorOne);
        add(liquidOneExample);
       
       
      g=new Shadow(9,"#FF3300",2);
      g.setChainedGraphics(new Border()).setChainedGraphics(new Gradient());
      LiquidCanvasBehavior liquidCanvasBehaviorTwo=new LiquidCanvasBehavior(g,new RoundedRect());

       
      WebMarkupContainer liquidTwoExample=new WebMarkupContainer("LiquidTwo");
      liquidTwoExample.add(liquidCanvasBehaviorTwo);
View Full Code Here

Examples of org.zkoss.test.Border

  @Test
  public void toggle_gridline() {
   
    //toggle on
    click(".zschktbtn-gridlines");
    Border expected = new Border("1px", "solid", "#D0D7E9");
    Assert.assertEquals(expected, getCell(11, 11).getRightBorder());
   
    //toggle off
    click(".zschktbtn-gridlines");
    expected = new Border("1px", "solid", "#FFFFFF");
    Assert.assertEquals(expected, getCell(11, 11).getRightBorder());
  }
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.