Examples of TButton


Examples of com.golden.gamedev.gui.TButton

    }

    return ui;
  }
  public void processUI(TComponent component, BufferedImage[] ui) {
    TButton button = (TButton) component;

    String[] color = new String[] {
      "Text Color", "Text Over Color",
      "Text Pressed Color", "Text Disabled Color"
    };
    String[] font = new String[] {
      "Text Font", "Text Over Font",
      "Text Pressed Font", "Text Disabled Font"
    };

    String[] document = GraphicsUtil.parseString(button.getText());
    for (int i=0;i < 4;i++) {
      Graphics2D g = ui[i].createGraphics();
      g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                 RenderingHints.VALUE_ANTIALIAS_ON);
      GraphicsUtil.drawString(g, document,
                  button.getWidth(), button.getHeight(),
                  (GameFont) get(font[i], component),
                  (Color) get(color[i], component),
                  (Integer) get("Text Horizontal Alignment Integer", component),
                  (Integer) get("Text Vertical Alignment Integer", component),
                  (Insets) get("Text Insets", component),
View Full Code Here

Examples of com.golden.gamedev.gui.TButton

      g.dispose();
    }
  }
  public void renderUI(Graphics2D g, int x, int y,
             TComponent component, BufferedImage[] ui) {
    TButton button = (TButton) component;

    if (!button.isEnabled()) g.drawImage(ui[3], x, y, null);
    else if (button.isMousePressed()) g.drawImage(ui[2], x, y, null);
    else if (button.isMouseOver()) g.drawImage(ui[1], x, y, null);
    else g.drawImage(ui[0], x, y, null);
  }
View Full Code Here

Examples of com.golden.gamedev.gui.TButton

   
    return ui;
  }
 
  public void processUI(TComponent component, BufferedImage[] ui) {
    TButton button = (TButton) component;
   
    String[] color = new String[] {
            "Text Color", "Text Over Color", "Text Pressed Color",
            "Text Disabled Color"
    };
    String[] font = new String[] {
            "Text Font", "Text Over Font", "Text Pressed Font",
            "Text Disabled Font"
    };
   
    String[] document = GraphicsUtil.parseString(button.getText());
    for (int i = 0; i < 4; i++) {
      Graphics2D g = ui[i].createGraphics();
      g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
              RenderingHints.VALUE_ANTIALIAS_ON);
      GraphicsUtil.drawString(g, document, button.getWidth(), button
              .getHeight(), (GameFont) this.get(font[i], component),
              (Color) this.get(color[i], component), (Integer) this.get(
                      "Text Horizontal Alignment Integer", component),
              (Integer) this.get("Text Vertical Alignment Integer",
                      component), (Insets) this.get("Text Insets",
View Full Code Here

Examples of com.golden.gamedev.gui.TButton

      g.dispose();
    }
  }
 
  public void renderUI(Graphics2D g, int x, int y, TComponent component, BufferedImage[] ui) {
    TButton button = (TButton) component;
   
    if (!button.isEnabled()) {
      g.drawImage(ui[3], x, y, null);
    }
    else if (button.isMousePressed()) {
      g.drawImage(ui[2], x, y, null);
    }
    else if (button.isMouseOver()) {
      g.drawImage(ui[1], x, y, null);
    }
    else {
      g.drawImage(ui[0], x, y, null);
    }
View Full Code Here

Examples of de.yaams.extensions.basemap.tiled.mapeditor.widget.TButton

    // toolBar.add(Box.createRigidArea(new Dimension(5, 5)));
    // toolBar.add(objectAddButton);
    // toolBar.add(objectRemoveButton);
    // toolBar.add(objectMoveButton);
    toolBar.add(Box.createRigidArea(new Dimension(0, 5)));
    toolBar.add(new TButton(zoomInAction));
    toolBar.add(new TButton(zoomOutAction));
    toolBar.add(Box.createRigidArea(new Dimension(5, 5)));
    toolBar.add(Box.createGlue());

    brushPreview = new BrushPreview();
    mapEventAdapter.addListener(brushPreview);
View Full Code Here

Examples of de.yaams.extensions.basemap.tiled.mapeditor.widget.TButton

    sliderPanel.add(opacityLabel);
    sliderPanel.add(opacitySlider);
    sliderPanel.setMaximumSize(new Dimension(Integer.MAX_VALUE, sliderPanel.getPreferredSize().height));

    // Layer buttons
    AbstractButton layerAddButton = new TButton(addLayerAction);
    mapEventAdapter.addListener(layerAddButton);

    JPanel layerButtons = new JPanel();
    layerButtons.setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 1;
    layerButtons.add(layerAddButton, c);
    layerButtons.add(new TButton(moveLayerUpAction), c);
    layerButtons.add(new TButton(moveLayerDownAction), c);
    layerButtons.add(new TButton(cloneLayerAction), c);
    layerButtons.add(new TButton(deleteLayerAction), c);
    layerButtons.setMaximumSize(new Dimension(Integer.MAX_VALUE, layerButtons.getPreferredSize().height));

    // tileInstancePropertiesButton = new JButton("Properties");
    // tileInstancePropertiesButton.setActionCommand("tileInstanceProperties");
    // mapEventAdapter.addListener(tileInstancePropertiesButton);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.