Package ModalGUI

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


      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

       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

    //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

    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

TOP

Related Classes of ModalGUI.GUIButton

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.