Package ModalGUI

Examples of ModalGUI.GUIButton


    GUIImage guiImg;
    guiImg = new GUIImage(0, 50, "gui/WINDOW_TITLE_MAKE.png", GLOBAL.gui);
    window.add(guiImg);

    GUIButton button;
    button = new GUIToggle(400, 50, "gui/WINDOW_MAKE_PREVIEW_PATTERN.png",
        GLOBAL.gui);
    button.addActionListener(GLOBAL.uiTools, "toggleView", UITools.LEG_TOOL);
    button.addActionListener(window, "close", UITools.LEG_TOOL);
    window.add(button);
    posY += spacingY;

    button = new GUIToggle(400, 200, "gui/WINDOW_MAKE_CUT_PATTERN.png",
        GLOBAL.gui);
    button.addActionListener(window, "close", UITools.LEG_TOOL);
    if (SETTINGS.autoSaveMakePattern)
      button.addActionListener(GLOBAL.uiTools, "savePDFauto",
          UITools.LEG_TOOL);
    else
      button.addActionListener(GLOBAL.uiTools, "print", UITools.LEG_TOOL);

    window.add(button);

    posY += spacingY;
View Full Code Here


loginLabel = new GUILabel(20,80,"",GLOBAL.gui);
loginWindow.add(loginLabel);


GUIButton button;
button = new GUIButton(20,100,60,20,"login", GLOBAL.gui);
//button.addActionListener(loginWindow, "close", UITools.LEG_TOOL);
button.addActionListener(this, "loginReturn", UITools.LEG_TOOL);
loginWindow.add(button);

button = new GUIButton(100,100,60,20,"cancel", GLOBAL.gui);
button.addActionListener(loginWindow, "close", UITools.LEG_TOOL);
//button.addActionListener(this, "loginReturn", UITools.LEG_TOOL);
loginWindow.add(button);
   
  }
View Full Code Here

    File fp = new File(folder);

    if (!fp.isDirectory())
      return;

    GUIButton button = null;

    String dirContence[] = fp.list();

    for (int i = 0; i < dirContence.length; i++) {
View Full Code Here

    this.propertiesPanel.clear();


    float yPos = 25;
    GUIButton button = new GUIButton(10f, yPos, 45, 45,
        "gui/GUI_SLICE_EDIT_BUTTOM.png", null, this.controller);
    button.addActionListener(this, "editSlice", this.sliceSelections.l.indexOf(sliceSelection));
    button.setLabel("edit");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;
    this.propertiesPanel.add(button);
    //yp+= 20;

    button = new GUIButton(50f, yPos, 45, 45,
        "gui/GUI_SLICE_DELETE_BUTTON.png", null, this.controller);
    button.addActionListener(sliceSelection, "destroy", UITools.LEG_TOOL);
    button.addActionListener(this, "removeSliceCleanup", null);

    button.setLabel("delete");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;
    this.propertiesPanel.add(button);

    GUIToggle toggle = null;
View Full Code Here

    GUIImage guiImg;
    guiImg = new GUIImage(30, 50, "gui/WINDOW_INTRO_TITLE.png", gui);
    window.add(guiImg);

    GUIButton button;
    button = new GUIToggle(400, 50, "gui/WINDOW_INTRO_NEW_CHAIR-03.png",
        gui);
    button.addActionListener(GLOBAL.uiTools, "deleteAllChairs",
        UITools.LEG_TOOL);
    button.addActionListener(GLOBAL.uiTools, "setDisplaypanelAsShown",
        UITools.LEG_TOOL);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_TOOL);

    button.addActionListener(window, "close", UITools.LEG_TOOL);
    window.add(button);
    posY += spacingY;

    button = new GUIToggle(400, 200, "gui/WINDOW_INTRO_LIBRARY.png", gui);
    button.addActionListener(window, "close", UITools.LEG_TOOL);
    button.addActionListener(GLOBAL.uiTools, "setDisplaypanelAsShown",
        UITools.LEG_TOOL);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.SELECT_TOOL);
    button.addActionListener(GLOBAL.uiTools, "loadTemplateChair",
        UITools.LEG_TOOL);
    window.add(button);

    posY += spacingY;
View Full Code Here

    float posY = 10;
    float posX = 10;

    gui.reset();
    GUIButton resetButton;

    gui.useAlphaMouseOver = true;

    GUIButton button;
    GUIToggle toggle;
    String TOOL_NAME = null;

    posY = 0;
    setupMenuBar(applet);
View Full Code Here

    toggle.setLabel("rotate");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(toggle);

    GUIButton button = new GUIButton(posX, posY, button_width,
        button_height, "gui/undo.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "undo", UITools.SCALE_TOOL);
    button.setLabel("undo");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, button_width, button_height,
        "gui/GUI_SLICE_DELETE_BUTTON.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "deleteAllChairsFlag",
        UITools.SCALE_TOOL);
    button.setLabel("delete");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, button_width, button_height,
        "gui/GUI_MAKE_BUTTON.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "makeChairWindow",
        UITools.SCALE_TOOL);
    button.setLabel("make");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(button);
View Full Code Here

    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(toggle);

    GUIButton button = new GUIButton(posX, posY, button_width,
        button_height, "gui/undo.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "undo", UITools.SCALE_TOOL);
    button.setLabel("undo");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(button);
View Full Code Here

    tabbedPanel.addTabbedPanel(toolPanel, "tools", gui);

   
    //save

    GUIButton button = new GUIButton(0, 0, button_width, button_height,
        "gui/save_pdf.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "savePDF",
        UITools.VIEW_SHAPE_PACK);
    button.setLabel("save pdf");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(button);

    button = new GUIButton(0, 0, button_width, button_height,
        "gui/print.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "print",
        UITools.VIEW_SHAPE_PACK);
    button.setLabel("print");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(button);

    button = new GUIButton(0, 0, button_width, button_height,
        "gui/plot.png", null, gui);
    button.addActionListener(GLOBAL.uiTools, "saveCraftRobo",
        UITools.VIEW_SHAPE_PACK);
    button.setLabel("plot");
    button.label.align = GUILabel.CENTRE;
    button.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(button);
   
    // materials
View Full Code Here

  static void setupGUI(PApplet applet, ModalGUI gui) {

    float posY = 10;
    float posX = 10;
    gui.reset();
    GUIButton resetButton;

    gui.useAlphaMouseOver = false;

    GUIButton button;
    GUIToggle toggle;
    String LANGUAGE = SETTINGS.LANGUAGE;
    String TOOL_NAME = null;

    //GUIPanel filePanel = new GUIPanel(5,3,37f,340f);
    //filePanel.setLabel("file");
    GUIPanel toolPanel = new GUIPanel(10, 15, 42f, 390f, gui);

    GUIPanel cameraPanel = new GUIPanel(65f, 15, 115, 87, gui);
    cameraPanel.setLabel("camera");

    GUIPanel physicsPanel = new GUIPanel(65f, 110f, 115, 95, gui);
    physicsPanel.setLabel("physics");

    GLOBAL.environments.setupGUI(GLOBAL.gui, GLOBAL.applet);
    GLOBAL.planesWidget.setupGUI(GLOBAL.applet, GLOBAL.gui);
    GLOBAL.loadWidget.setupGUI(GLOBAL.applet, GLOBAL.gui);
    GLOBAL.widgetMaterials.setupGUI(GLOBAL.applet, GLOBAL.gui);

    GLOBAL.environments.panel.docTo(GLOBAL.slicesWidget.panel);
    GLOBAL.loadWidget.panel.docTo(GLOBAL.environments.panel);
    GLOBAL.widgetMaterials.panel.docTo(GLOBAL.loadWidget.panel);

    //cameraPanel.autoHide = true;
    //physicsPanel.autoHide = true;
    //filePanel.autoHide = true;

    gui.add(toolPanel);

    gui.add(cameraPanel);

    gui.add(physicsPanel);

    button = new GUIButton(posX, posY, "proButtons/GUI_DRAW_TOOL_UP.png",
        "proButtons/GUI_DRAW_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_TOOL);

    button.addToolTip(GLOBAL.applet, "proButtons/GUI_DRAW_TOOLTIP",
        LANGUAGE);

    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_LEG_TOOL_UP.png",
        "proButtons/GUI_LEG_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.LEG_TOOL);
    //button.addToolTip(GLOBAL.applet,"proButtons/GUI_LEG_TOOLTIP", LANGUAGE);
    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_SELECT_TOOL_UP.png",
        "proButtons/GUI_SELECT_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.SELECT_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_SELECT_TOOLTIP",
        LANGUAGE);
    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_DRAW_PATH_UP.png",
        "proButtons/GUI_DRAW_PATH_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_PATH_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_DRAW_PATH_TOOLTIP",
        LANGUAGE);
    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY,
        "proButtons/GUI_SELECT_BEZIER_UP.png",
        "proButtons/GUI_SELECT_BEZIER_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.SELECT_BEZIER_TOOL);
    button.addToolTip(GLOBAL.applet,
        "proButtons/GUI_SELECT_BEZIER_TOOLTIP", LANGUAGE);
    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY,
        "proButtons/GUI_MEASURE_TOOL_UP.png",
        "proButtons/GUI_MEASURE_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MEASURE_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_MEASURE_TOOLTIP",
        LANGUAGE);
    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_ZOOM_TOOL_UP.png",
        "proButtons/GUI_ZOOM_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.ZOOM_CAM_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_ZOOM_TOOLTIP",
        LANGUAGE);
    gui.add(button);
    posY += 30;
    cameraPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_ROTATE_TOOL_UP.png",
        "proButtons/GUI_ROTATE_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.ROTATE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_ZOOM_TOOLTIP",
        LANGUAGE);
    gui.add(button);
    posY += 30;
    cameraPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_CAMERA_MOVE_UP.png",
        "proButtons/GUI_CAMERA_MOVE_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_MOVE_CAM_TOOLTIP",
        LANGUAGE);

    gui.add(button);
    posY += 30;
    cameraPanel.placeComponent(button);

    button = new GUIButton(posX, posY,
        "proButtons/GUI_CAM_JUMP_FRONT_UP.png",
        "proButtons/GUI_CAM_JUMP_FRONT_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "camJumpFront",
        UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_MOVE_OBJECT_TOOLTIP",
        LANGUAGE);

    gui.add(button);
    posY += 30;
    cameraPanel.placeComponent(button);

    button = new GUIButton(posX, posY,
        "proButtons/GUI_CAM_JUMP_SIDE_UP.png",
        "proButtons/GUI_CAM_JUMP_SIDE_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "camJumpSide",
        UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet,
        "proButtons/GUI_CAM_JUMP_SIDE_TOOLTIP", LANGUAGE);

    gui.add(button);
    posY += 30;
    cameraPanel.placeComponent(button);

    button = new GUIButton(posX, posY,
        "proButtons/GUI_CAM_JUMP_TOP_UP.png",
        "proButtons/GUI_CAM_JUMP_TOP_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "camJumpTop",
        UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_CAM_JUMP_TOP_TOOLTIP",
        LANGUAGE);

    gui.add(button);
    posY += 30;
    cameraPanel.placeComponent(button);

    //PHYSICS controls
    physicsToggle = new GUIToggle(posX, posY,
        "proButtons/GUI_PHYSICS_START_UP.png",
        "proButtons/GUI_PHYSICS_START_DOWN.png", gui);
    physicsToggle.addActionListener(GLOBAL.uiTools, "physicsPlay",
        UITools.MOVE_CAM_TOOL);
    physicsToggle.addToolTip(GLOBAL.applet,
        "proButtons/GUI_PHYSICS_START_TOOLTIP", LANGUAGE);

    physicsToggle.addLinkedVal(gui.physics_on);

    gui.add(physicsToggle);
    posY += 30;
    physicsPanel.placeComponent(physicsToggle);

    //PHYSICS controls
    button = new GUIButton(posX, posY,
        "proButtons/GUI_PHYSICS_PAUSE_UP.png",
        "proButtons/GUI_PHYSICS_PAUSE_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "physicsPause",
        UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet,
        "proButtons/GUI_PHYSICS_PAUSE_TOOLTIP", LANGUAGE);

    gui.add(button);
    posY += 30;
    physicsPanel.placeComponent(button);

    //PHYSICS controls
    button = new GUIButton(posX, posY,
        "proButtons/GUI_PHYSICS_RESTART_UP.png",
        "proButtons/GUI_PHYSICS_RESTART_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "physicsRewind",
        UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet,
        "proButtons/GUI_PHYSICS_RESTART_TOOLTIP", LANGUAGE);

    gui.add(button);
    posY += 30;
    physicsPanel.placeComponent(button);

    button = new GUIButton(posX, posY,
        "proButtons/GUI_MOVE_CAM_TOOL_UP.png",
        "proButtons/GUI_MOVE_CAM_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MOVE_OBJECT);
    gui.add(button);
    posY += 30;
    physicsPanel.placeComponent(button);

    toggle = new GUIToggle(posX, posY, "proButtons/GUI_BUILD_CHAIR_UP.png",
        "proButtons/GUI_BUILD_CHAIR_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "toggleCentreConstraintChair",
        UITools.MOVE_OBJECT);
    gui.add(toggle);
    posY += 30;
    physicsPanel.placeComponent(toggle);
    toggle.setState(true);

    button = new GUIButton(posX, posY, "proButtons/GUI_CAMERA_MOVE_UP.png",
        "proButtons/GUI_CAMERA_MOVE_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MOVE_2D_TOOL);
    gui.add(button);
    posY += 30;
    physicsPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_SCALE_TOOL_UP.png",
        "proButtons/GUI_SCALE_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SCALE_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_SCALE_TOOLTIP",
        LANGUAGE);

    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);

    button = new GUIButton(posX, posY, "proButtons/GUI_UNDO_TOOL_UP.png",
        "proButtons/GUI_UNDO_TOOL_DOWN.png", gui);
    button.addActionListener(GLOBAL.uiTools, "undo", UITools.MOVE_CAM_TOOL);
    button.addToolTip(GLOBAL.applet, "proButtons/GUI_UNDO_TOOLTIP",
        LANGUAGE);

    gui.add(button);
    posY += 30;
    toolPanel.placeComponent(button);
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.