Package com.scriptographer.adm

Examples of com.scriptographer.adm.Item


  }

  protected int addToContent(Dialog dialog,
      LinkedHashMap<String, com.scriptographer.adm.Component> content,
      int column, int row) {
    Item valueItem = createItem(dialog);
    String label = component.getLabel();
    boolean isRuler = component.getType() == ComponentType.RULER;
    boolean hasLabel = !isRuler && label != null && !"".equals(label);
    if (hasLabel) {
      TextPane labelItem = new TextPane(dialog);
      labelItem.setText(label + ":");
      // Adjust top margin of label to reflect the native margin
      // in the value item.
      Item marginItem = valueItem;
      // If this is an item group, use the first item in it instead
      // This is only needed for FontPopupList so far.
      if (marginItem instanceof ItemGroup)
        marginItem = (Item) ((ItemGroup) marginItem).getContent().get(0);
      Border margin = marginItem.getVisualMargin();
      // Also take into account any margins the component might have set
      if (valueItem != marginItem)
        margin = margin.add(valueItem.getMargin());
      labelItem.setMargin(margin.top + 3, 4, 0, 0);
      content.put(column + ", " + row + ", right, top", labelItem);
View Full Code Here

TOP

Related Classes of com.scriptographer.adm.Item

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.