コード例 #1
0
ファイル: ClientAreaImpl.java プロジェクト: carlthronson/birt
 /**
  * Resets all member variables within this object recursively
  *
  * <p>Note: Manually written
  */
 public final void initialize() {
   // setBackground( ColorDefinitionImpl.WHITE( ) );
   final LineAttributes lia =
       LineAttributesImpl.create(ColorDefinitionImpl.BLACK(), LineStyle.SOLID_LITERAL, 0);
   lia.setVisible(false);
   setOutline(lia);
   setInsets(InsetsImpl.create(0, 0, 0, 0));
 }
コード例 #2
0
ファイル: DialImpl.java プロジェクト: PhantorGorth/BIRT
  protected final void initialize() {
    // Outline
    LineAttributes lia =
        LineAttributesImpl.create(ColorDefinitionImpl.BLACK(), LineStyle.SOLID_LITERAL, 1);
    setLineAttributes(lia);

    // Label
    Label lb = LabelImpl.create();
    setLabel(lb);

    // MAJOR GRID
    Grid gr = ComponentFactory.eINSTANCE.createGrid();
    lia =
        LineAttributesImpl.create(
            ColorDefinitionImpl.create(196, 196, 196), LineStyle.SOLID_LITERAL, 1);
    lia.setVisible(true);
    gr.setLineAttributes(lia);
    lia =
        LineAttributesImpl.create(
            ColorDefinitionImpl.create(196, 196, 196), LineStyle.SOLID_LITERAL, 1);
    gr.setTickAttributes(lia);
    gr.setTickStyle(TickStyle.BELOW_LITERAL);
    setMajorGrid(gr);

    // MINOR GRID
    gr = ComponentFactory.eINSTANCE.createGrid();
    lia =
        LineAttributesImpl.create(
            ColorDefinitionImpl.create(225, 225, 225), LineStyle.SOLID_LITERAL, 1);
    lia.setVisible(false);
    gr.setLineAttributes(lia);
    lia =
        LineAttributesImpl.create(
            ColorDefinitionImpl.create(225, 225, 225), LineStyle.SOLID_LITERAL, 1);
    lia.setVisible(false);
    gr.setTickAttributes(lia);
    gr.setTickStyle(TickStyle.BELOW_LITERAL);
    setMinorGrid(gr);

    // SCALE
    Scale sc = ComponentFactory.eINSTANCE.createScale();
    sc.setMinorGridsPerUnit(5);
    setScale(sc);
  }
コード例 #3
0
ファイル: LineSeriesImpl.java プロジェクト: jimmly/birt
  /**
   * Initializes all member variables within this object recursively
   *
   * <p>Note: Manually written
   */
  protected void initialize() // SUBCLASSED BY ScatterSeriesImpl
      {
    super.initialize();

    final LineAttributes lia = AttributeFactory.eINSTANCE.createLineAttributes();
    ((LineAttributesImpl) lia).set(ColorDefinitionImpl.BLACK(), LineStyle.SOLID_LITERAL, 1);
    lia.setVisible(true);
    setLineAttributes(lia);
    setLabelPosition(Position.ABOVE_LITERAL);

    final Marker m = AttributeFactory.eINSTANCE.createMarker();
    m.setType(MarkerType.BOX_LITERAL);
    m.setSize(4);
    m.setVisible(true);
    LineAttributes la = AttributeFactory.eINSTANCE.createLineAttributes();
    la.setVisible(true);
    m.setOutline(la);
    getMarkers().add(m);
    setPaletteLineColor(true);
  }
コード例 #4
0
 /*
  * (non-Javadoc)
  *
  * @see
  * org.eclipse.birt.chart.device.util.ChartTextRenderer#renderOutline(org
  * .eclipse.birt.chart.device.IPrimitiveRenderer,
  * org.eclipse.birt.chart.model.attribute.LineAttributes,
  * java.awt.geom.Rectangle2D.Double)
  */
 @Override
 protected void renderOutline(
     IPrimitiveRenderer renderer, LineAttributes lineAttribs, Double rect) {
   if (lineAttribs != null && lineAttribs.isVisible() && lineAttribs.getColor() != null) {
     SVGGraphics2D g2d = (SVGGraphics2D) ((IDeviceRenderer) renderer).getGraphicsContext();
     Stroke sPrevious = null;
     final ColorDefinition cd = lineAttribs.getColor();
     final Stroke sCurrent = ((SVGRendererImpl) renderer).getCachedStroke(lineAttribs);
     if (sCurrent != null) // SOME STROKE DEFINED?
     {
       sPrevious = g2d.getStroke();
       g2d.setStroke(sCurrent);
     }
     g2d.setColor((Color) _sxs.getColor(cd));
     g2d.draw(rect);
     g2d.setNoFillColor(g2d.getCurrentElement());
     if (sPrevious != null) // RESTORE PREVIOUS STROKE
     {
       g2d.setStroke(sPrevious);
     }
   }
 }