All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cb.petal.Label Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2001 Markus Dahm
 * Copyright (C) 2015-2018 BITPlan GmbH http://www.bitplan.com
 *
 * This source is part of
 * https://github.com/BITPlan/CrazyBeans
 * and the license as outlined there applies
 */
package cb.petal;
import java.util.Collection;

/**
 * Represents Label object
 *
 * @version $Id: Label.java,v 1.11 2001/06/22 09:10:36 dahm Exp $
 * @author  M. Dahm
 */
public class Label extends PetalObject implements Tagged {
  public Label(PetalNode parent, Collection params) {
    super(parent, "Label", params);
    setTag(tag);
  }

  public Label() {
    super("Label");
  }

  private int tag = -1;

  public void setTag(int t) { tag = t; }

  public int  getTag()      { return tag; }

  public Location getLocation() {
    return (Location)getProperty("location");
  }

  public void setLocation(Location o) {
    defineProperty("location", o);
  }

  public Font getFont() {
    return (Font)getProperty("font");
  }

  public void setFont(Font o) {
    defineProperty("font", o);
  }

  public int getNlines() {
    return getPropertyAsInteger("nlines");
  }

  public void setNlines(int o) {
    defineProperty("nlines", o);
  }

  public int getMaxWidth() {
    return getPropertyAsInteger("max_width");
  }

  public void setMaxWidth(int o) {
    defineProperty("max_width", o);
  }

  public String getLabel() {
    return getPropertyAsString("label");
  }

  public void setLabel(String o) {
    defineProperty("label", o);
  }

  public void accept(Visitor v) {
    v.visit(this);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy