Package org.geomajas.plugin.printing.component.dto

Examples of org.geomajas.plugin.printing.component.dto.LabelComponentInfo


          LegendItemComponentInfo item = new LegendItemComponentInfo();
          LegendIconComponentInfo icon = new LegendIconComponentInfo();
          icon.setLabel(text);
          icon.setStyleInfo(styleDefinition);
          icon.setLayerType(layerInfo.getLayerType());
          LabelComponentInfo legendLabel = new LabelComponentInfo();
          legendLabel.setBackgroundColor("0xFFFFFF");
          legendLabel.setBorderColor("0x000000");
          legendLabel.setFontColor("0x000000");
          legendLabel.setFont(legend.getFont());
          legendLabel.setText(text);
          legendLabel.setTextOnly(true);
          item.addChild(icon);
          item.addChild(legendLabel);
          legend.addChild(item);
        }
      } else if (layer instanceof RasterLayer && layer.isShowing()) {
        RasterLayer rasterLayer = (RasterLayer) layer;
        ClientRasterLayerInfo layerInfo = rasterLayer.getLayerInfo();
        LegendItemComponentInfo item = new LegendItemComponentInfo();
        LegendIconComponentInfo icon = new LegendIconComponentInfo();
        icon.setLabel(layerInfo.getLabel());
        icon.setLayerType(layerInfo.getLayerType());
        LabelComponentInfo legendLabel = new LabelComponentInfo();
        legendLabel.setFont(legend.getFont());
        legendLabel.setBackgroundColor("0xFFFFFF");
        legendLabel.setBorderColor("0x000000");
        legendLabel.setFontColor("0x000000");
        legendLabel.setText(layerInfo.getLabel());
        legendLabel.setTextOnly(true);
        item.addChild(icon);
        item.addChild(legendLabel);
        legend.addChild(item);
      }
    }
View Full Code Here


  }

  @Override
  protected LabelComponentInfo buildTitle() {
    if (titleText != null) {
      LabelComponentInfo title = super.buildTitle();
      title.setText(titleText);
      title.getLayoutConstraint().setMarginY(2 * marginY);
      return title;
    } else {
      return null;
    }
  }
View Full Code Here

    ScaleBarComponentInfo scaleBar = new ScaleBarComponentInfo();
    return scaleBar;
  }

  protected LabelComponentInfo buildTitle() {
    LabelComponentInfo label = new LabelComponentInfo();
    FontStyleInfo style = new FontStyleInfo();
    style.setFamily("Dialog");
    style.setStyle("Italic");
    style.setSize(14);
    label.setFont(style);
    label.setBackgroundColor("0xFFFFFF");
    label.setBorderColor("0x000000");
    label.setFontColor("0x000000");
    label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP);
    label.getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.CENTER);
    label.setTag("title");
    return label;
  }
View Full Code Here

          LegendItemComponentInfo item = new LegendItemComponentInfo();
          LegendIconComponentInfo icon = new LegendIconComponentInfo();
          icon.setLabel(text);
          icon.setStyleInfo(styleDefinition);
          icon.setLayerType(layerInfo.getLayerType());
          LabelComponentInfo legendLabel = new LabelComponentInfo();
          legendLabel.setBackgroundColor("0xFFFFFF");
          legendLabel.setBorderColor("0x000000");
          legendLabel.setFontColor("0x000000");
          legendLabel.setFont(legend.getFont());
          legendLabel.setText(text);
          legendLabel.setTextOnly(true);
          item.addChild(icon);
          item.addChild(legendLabel);
          legend.addChild(item);
        }
      } else if (layer instanceof ClientRasterLayerInfo) {
        ClientRasterLayerInfo layerInfo = (ClientRasterLayerInfo) layer;
        LegendItemComponentInfo item = new LegendItemComponentInfo();
        LegendIconComponentInfo icon = new LegendIconComponentInfo();
        icon.setLabel(layerInfo.getLabel());
        icon.setLayerType(layerInfo.getLayerType());
        LabelComponentInfo legendLabel = new LabelComponentInfo();
        legendLabel.setFont(legend.getFont());
        legendLabel.setBackgroundColor("0xFFFFFF");
        legendLabel.setBorderColor("0x000000");
        legendLabel.setFontColor("0x000000");
        legendLabel.setText(layerInfo.getLabel());
        legendLabel.setTextOnly(true);
        item.addChild(icon);
        item.addChild(legendLabel);
        legend.addChild(item);
      }
    }
View Full Code Here

    }
    return legend;
  }

  private LabelComponentInfo getLegendLabel(LegendComponentInfo legend, String text) {
    LabelComponentInfo legendLabel = new LabelComponentInfo();
    legendLabel.setBackgroundColor(PrintingLayout.templateDefaultBackgroundColor);
    legendLabel.setBorderColor(PrintingLayout.templateDefaultBorderColor);
    legendLabel.setFontColor(PrintingLayout.templateDefaultColor);
    legendLabel.setFont(legend.getFont());
    legendLabel.setText(text);
    legendLabel.setTextOnly(true);
    return legendLabel;
  }
View Full Code Here

  }

  @Override
  protected LabelComponentInfo buildTitle() {
    if (titleText != null) {
      LabelComponentInfo title = super.buildTitle();
      title.setText(titleText);
      title.getLayoutConstraint().setMarginY(2 * marginY);
      return title;
    } else {
      return null;
    }
  }
View Full Code Here

  protected ScaleBarComponentInfo buildScaleBar() {
    return new ScaleBarComponentInfo();
  }

  protected LabelComponentInfo buildTitle() {
    LabelComponentInfo label = new LabelComponentInfo();
    FontStyleInfo style = new FontStyleInfo();
    style.setFamily(PrintingLayout.templateDefaultFontFamily);
    style.setStyle(PrintingLayout.templateDefaultFontStyle);
    style.setSize((int) PrintingLayout.templateDefaultFontSize);
    label.setFont(style);
    label.setBackgroundColor(PrintingLayout.templateDefaultBackgroundColor);
    label.setBorderColor(PrintingLayout.templateDefaultBorderColor);
    label.setFontColor(PrintingLayout.templateDefaultColor);
    label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP);
    label.getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.CENTER);
    label.setTag("title");
    return label;
  }
View Full Code Here

TOP

Related Classes of org.geomajas.plugin.printing.component.dto.LabelComponentInfo

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.