Examples of GuiButton


Examples of ModalGUI.GUIButton

      GUIPanel panel, PApplet applet) {
    File fp = new File(folder);

    if (!fp.isDirectory())
      return;
    GUIButton button = null;

    String dirContence[] = fp.list();

    for (int i = 0; i < dirContence.length; i++) {

      String path = folder + "\\" + dirContence[i];

      int dot = path.lastIndexOf(".");
      String ext = path.substring(dot + 1);

      if (ext.equals("jpg") || ext.equals("png")) {

        PImage image = applet.loadImage(path);
        PImage imageCpy = applet.createImage(40, 40, 2);

        if (image.width > image.height)
          imageCpy.copy(image, 0, 0, image.height, image.height, 0,
              0, 40, 40);
        else
          imageCpy.copy(image, 0, 0, image.width, image.width, 0, 0,
              40, 40);

        //image.resize(40, 40);

        button = new GUIButton(0, 0, imageCpy, null, GLOBAL.applet, gui);
        button.addActionListener(GLOBAL.environments,
            "loadEnvironment", path);

        //gui.add(button);
        panel.placeComponent(button);
      }
View Full Code Here

Examples of ModalGUI.GUIButton

      this.add(label);
      */
      //middleComponents.add(label);
   
    
     makeItBtn = new GUIButton(posX,-7,"gui/make_it_up.png","gui/make_it_down.png",gui );
     makeItBtn.addActionListener(GLOBAL.uiTools, "viewPattern", null);
     this.add(makeItBtn);
    
     designItBtn = new GUIButton(posX,-7,"gui/design_it_up.png","gui/design_it_down.png",gui );
     designItBtn.addActionListener(GLOBAL.uiTools, "viewModel", null);
     this.add(designItBtn);
    
    
    
     if(GLOBAL.uiTools.currentView == UITools.VIEW_CHAIR_EDIT){
     designItBtn.hide();
     makeItBtn.show();
     }else{
     designItBtn.show();
     makeItBtn.hide();   
     }
    
    GUIButton button = null;
   
    button = new GUIButton(posX+150,modelPannelYPosBase-50,"gui/GUI_ERGO_BIGGER.png","gui/GUI_ERGO_BIGGER.png",gui );
    button.addActionListener(GLOBAL.uiTools, "figureGrow", null);
    this.add(button);
     middleComponents.add(button);

   
    button = new GUIButton(posX+150,modelPannelYPosBase - 35,"gui/GUI_ERGO_BAR.png","gui/GUI_ERGO_BAR.png",gui );
    this.add(button);
     middleComponents.add(button);
   
    button = new GUIButton(posX+150,modelPannelYPosBase-10,"gui/GUI_ERGO_SMALLER.png","gui/GUI_ERGO_SMALLER.png",gui );
    button.addActionListener(GLOBAL.uiTools, "figureShrink", null);
    this.add(button);
     middleComponents.add(button);
    
     /*
    label = new GUILabel(2,patternPannelYPos-20,"pattern | view", gui);
View Full Code Here

Examples of ModalGUI.GUIButton

       toggle.toggleDown();
     toggle.setLabel("add labels");
      //toggle.label.align = GUILabel.CENTRE; toggle.label.layout = GUILabel;
      add(toggle);
     
    GUIButton button = new GUIButton(800, 30, 60, 15,"Apply", gui);
    button.addActionListener(GLOBAL.uiTools, "applyMaterialSettings");
    add(button);
  }
View Full Code Here

Examples of ModalGUI.GUIButton

    //System.out.println(folder);
    File fp = new File(folder);

    if (!fp.isDirectory())
      return;
    GUIButton button = null;

    String dirContence[] = fp.list();

    for (int i = 0; i < dirContence.length; i++) {

      String path = folder + "/" + dirContence[i];

      int dot = path.lastIndexOf(".");
      String ext = path.substring(dot + 1);

      if (ext.equals("jpg") || ext.equals("png")) {

        PImage image = applet.loadImage(path);
        PImage imageCpy = applet.createImage(thumbSize, thumbSize, 2);

        if (image.width > image.height)
          imageCpy.copy(image, 0, 0, image.height, image.height, 0,
              0, thumbSize, thumbSize);
        else
          imageCpy.copy(image, 0, 0, image.width, image.width, 0, 0,
              thumbSize, thumbSize);

        //image.resize(40, 40);

        button = new GUIButton(0, 0, imageCpy, null, GLOBAL.applet, gui);
        button.addActionListener(window, "close", path);
        button.addActionListener(this, "loadChair", path);

        //gui.add(button);
        this.scrollPanel.placeComponent(button);
      }
    }
View Full Code Here

Examples of ModalGUI.GUIButton

    String LANGUAGE = "ENG";
    float panelX = 200;
    this.clear();
    this.setContentPosition(250, 25);// = 200;

    buttonAddPlane = new GUIButton(panelX, 15,
        "gui/GUI_LAYER_NEWLAYER_BUTTON.png", this.controller);
    buttonAddPlane.addActionListener(GLOBAL.uiTools, "addPlane",
        UITools.LEG_TOOL);
    buttonAddPlane.setLabel("new");
    buttonAddPlane.label.align = GUILabel.CENTRE;
    buttonAddPlane.label.layout = GUILabel.UNDER_COMPONENT;
    placeComponent(buttonAddPlane);
    buttonAddPlane.setParentPanel(this);

    buttonDeletePlane = new GUIButton(panelX, 15,
        "gui/GUI_LAYER_DELETE_BUTTON.png", this.controller);
    buttonDeletePlane.addActionListener(GLOBAL.uiTools,
        "removeSelectedPlanes", UITools.LEG_TOOL);
    buttonDeletePlane.setLabel("delete");
    buttonDeletePlane.label.align = GUILabel.CENTRE;
    buttonDeletePlane.label.layout = GUILabel.UNDER_COMPONENT;

    super.placeComponent(buttonDeletePlane);
    buttonDeletePlane.setParentPanel(this);

    this.mirrorPlaneToggle = new GUIToggle(200, 50,
        "gui/GUI_LAYER_MIRROR_BUTTON.png", this.controller);
    mirrorPlaneToggle.addActionListener(this, "mirrorPlanesToggle",
        UITools.LEG_TOOL);
    mirrorPlaneToggle.setLabel("mirror");
    mirrorPlaneToggle.label.align = GUILabel.CENTRE;
    mirrorPlaneToggle.label.layout = GUILabel.UNDER_COMPONENT;

    //this.mirrorPlaneToggle.addToolTip(GLOBAL.applet,
    //    "GUI_SLICE_MIRROR_TOOLTIP", LANGUAGE);

    super.placeComponent(this.mirrorPlaneToggle);
    this.mirrorPlaneToggle.setParentPanel(this);
    this.mirrorPlaneToggle.setState(true);

    this.selectAllPlanes = new GUIButton(200, 70,
        "gui/GUI_LAYER_SELECTALL_BUTTON.png", this.controller);
    this.selectAllPlanes.addActionListener(this, "selectAllPlanes",
        UITools.LEG_TOOL);
    this.selectAllPlanes.setLabel("all");
    this.selectAllPlanes.label.align = GUILabel.CENTRE;
    this.selectAllPlanes.label.layout = GUILabel.UNDER_COMPONENT;
    ///this.selectAllPlanes.addToolTip(GLOBAL.applet,
    //    "proButtons/GUI_SLICE_SELECT_ALL_TOOLTIP", LANGUAGE);

    super.placeComponent(this.selectAllPlanes);
    this.selectAllPlanes.setParentPanel(this);

    this.toggleGuide = new GUIButton(230, 15,
        "gui/GUI_LAYER_GUIDELAYER_BUTTON.png", this.controller);
    this.toggleGuide.addActionListener(this, "toggleGuide",
        UITools.LEG_TOOL);
    toggleGuide.setLabel("guide");
    toggleGuide.label.align = GUILabel.CENTRE;
View Full Code Here

Examples of net.minecraft.client.gui.GuiButton

    buildButtonList();
  }

  public void buildButtonList() {
    buttonList.clear();
    GuiButton enchantButton = new GuiButtonEnchant(this, enchanter, 0, x + 151, y + 33);
    buttonList.add(enchantButton);
    enchantButton.enabled = !enchanter.enchantments.isEmpty();

    for (int i = 0; i < 16; i++) {
      int z = -24;
View Full Code Here

Examples of net.minecraft.client.gui.GuiButton

        this.textFieldZ.setMaxStringLength(5);
        this.textFieldZ.setText(this.tileEntity.getFrequency() + "");
       
        this.buttonList.clear();
       
        this.buttonList.add(new GuiButton(0, var1 + 6, var2 + 60, 50, 20, "Set"));
    }
View Full Code Here

Examples of net.minecraft.client.gui.GuiButton

    private int backgroundHeight = 256;

    @Override
    @SuppressWarnings("unchecked")
    public void initGui() {
        this.buttonList.add(this.closeButton = new GuiButton(0, (this.width - this.backgroundWidth + 100) / 2, (this.height + this.backgroundHeight - 60) / 2, this.backgroundWidth - 100, 20, "Close"));
    }
View Full Code Here

Examples of net.minecraft.client.gui.GuiButton

    super.initGui();
    int sx = (width - xSize) / 2;
    int sy = (height - ySize) / 2;
    String str = Lang.localize("gui.travelAccessable.ok");
    int strLen = getFontRenderer().getStringWidth(str);
    GuiButton okB = new GuiButton(0, width / 2 - (strLen / 2) - 5, sy + 50, strLen + 10, 20, str);
    buttonList.clear();
    buttonList.add(okB);
  }
View Full Code Here

Examples of net.minecraft.client.gui.GuiButton

    int k = (width - xSize) / 2;
    int l = (height - ySize) / 2;
    renderPowerBar(k, l);

    for (int i = 0; i < buttonList.size(); ++i) {
      GuiButton guibutton = (GuiButton) this.buttonList.get(i);
      guibutton.drawButton(this.mc, 0, 0);
    }

    if(showRecipeButton()) {
      IconEIO.RECIPE.renderIcon(k + 155, l + 43, 16, 16, 0, true);
    }
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.