Package ca.nengo.ui.lib.world.piccolo.primitives

Examples of ca.nengo.ui.lib.world.piccolo.primitives.Text


   *            Action to execute when the button is pressed
   */
  public TextButton(String textLabel, Runnable action) {
    super(action);

    myTextNode = new Text("");
    myTextNode.setOffset(BORDER_WIDTH, BORDER_HEIGHT);
    myTextNode.setFont(NengoStyle.FONT_BUTTONS);
    myTextNode.setTextPaint(NengoStyle.COLOR_FOREGROUND);

    frame = Path.createRectangle(0, 0, 100, 100);
View Full Code Here


    rectangle = Path.createRectangle(0, 0, 1, 1);
    rectangle.setPaint(NengoStyle.COLOR_BACKGROUND2);

    addChild(rectangle);

    title = new Text(myWindow.getName());
    title.setFont(NengoStyle.FONT_LARGE);
    addChild(title);

    normalButton = new Button(new RestoreIcon(BUTTON_SIZE), new Runnable() {
      public void run() {
View Full Code Here

    this.parent = parent;
    this.iconReal = icon;

    addChild(icon);

    label = new Text();
    label.setConstrainWidthToTextWidth(true);
    updateLabel();
    addChild(label);

    parent.addPropertyChangeListener(Property.MODEL_CHANGED, this);
View Full Code Here

  private final Text sizeLabel;

  public NodeContainerIcon(UINodeViewable parent, WorldObject icon) {
    super(parent, icon);
    sizeLabel = new Text("");
    sizeLabel.setFont(NengoStyle.FONT_SMALL);
    sizeLabel.setConstrainWidthToTextWidth(true);
    addChild(sizeLabel);
    layoutChildren();
    modelUpdated();
View Full Code Here

  }

  private static WorldObject createTextIcon() {
    WorldObject titleHolder = new WorldObjectImpl();

    Text title = new Text(TEXT);
    title.setFont(FONT);

    title.setOffset(PADDING * 1.5, -0.5 * PADDING);
    titleHolder.addChild(title);

    titleHolder.setBounds(0, 0, title.getWidth() + PADDING * 2, title.getHeight());
    return titleHolder;
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see ca.nengo.ui.models.tooltips.ITooltipPart#toWorldObject()
   */
  public WorldObject toWorldObject(double width) {
    Text propertyText = new Text(propertyName + ": " + propertyValue);

    propertyText.setConstrainWidthToTextWidth(false);
    propertyText.setWidth(width);
    propertyText.recomputeLayout();

    return propertyText;
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see ca.nengo.ui.models.tooltips.ITooltipPart#getTooltipString()
   */
  public WorldObject toWorldObject(double width) {
    Text propertyText = new Text("*** " + titleName + " ***");

    propertyText.setConstrainWidthToTextWidth(false);
    propertyText.setWidth(width);
    propertyText.recomputeLayout();

    return propertyText;

  }
View Full Code Here

  public TrackedStatusMsg(String taskName, WorldObjectImpl wo) {
    super();

    if (wo != null) {
      taskText = new Text(taskName);
      taskText.setPaint(NengoStyle.COLOR_NOTIFICATION);
      taskText.setOffset(0, -taskText.getHeight());
      wo.addChild(taskText);

      setTaskName(wo.getName() + ": " + taskName);
View Full Code Here

    public BrainImageWrapper(AbstractBrainImage2D brainImage) {
        super();
        myBrainImage = brainImage;
        addChild(new WorldObjectImpl(new PXImage(brainImage)));

        myLabel = new Text();
        addChild(myLabel);
        updateLabel();

        addInputEventListener(new EventConsumer());
        addInputEventListener(new BrainImageMouseHandler());
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.world.piccolo.primitives.Text

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.