Examples of GUIToggle


Examples of ModalGUI.GUIToggle

    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);
View Full Code Here

Examples of ModalGUI.GUIToggle

        (int) width, (int) panelHeight, gui);
    tabbedPanel.addTabbedPanel(toolPanel, "tools", gui);

    GUIComponentSet toggleSet = new GUIComponentSet();

    GUIToggle toggle = new GUIToggle(posX, posY, button_width,
        button_height, "gui/draw.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.DRAW_TOOL);
    toggle.setLabel("brush");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/add_leg.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.LEG_TOOL);
    toggle.setLabel("leg");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/draw_path.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.DRAW_PATH_TOOL);
    toggle.setLabel("path");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/select.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.SELECT_TOOL);
    toggle.setLabel("select");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/bezier.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.SELECT_BEZIER_TOOL);
    toggle.setLabel("bezier");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/draw_path.png", gui);
    toggle.setComponentSet(toggleSet);
    toggle.addActionListener(sketch.getSketchTools(), "selectTool",
        SketchTools.DRAW_OFFSETPATH_TOOL);
    toggle.setLabel("offset path");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(toggle);
View Full Code Here

Examples of ModalGUI.GUIToggle

    //default
    if (iconFile == "")
      iconFile = "gui/GUI_SLICE_MULTISLICE_ICON.png";

    GUIToggle toggle = new GUIToggle(XPos, 30, 35, 35, iconFile, gui);
    toggle.setComponentSet(toggleSetSlices);
    toggle.addActionListener(this, "selectSlice", sliceSelections.size());

    toggle.setLabel(Integer.toString(SliceCount));
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    this.scrollPanel.add(toggle);
View Full Code Here

Examples of ModalGUI.GUIToggle

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

    GUIToggle toggle = null;

    float xPos = 95;
    GUIComponentSet toggleSet = new GUIComponentSet();

     xPos += 20;
     yPos = 10;

   
    GUILabel label = new GUILabel(xPos, yPos-10,"cap\nstyle",this.controller);
    this.propertiesPanel.add(label);
    xPos += 35;

    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_CAP_WING.png",this.controller);
    toggle.setComponentSet(radioSet);
    toggle.addActionListener(sliceSelection, "setCapType",
        CrossSliceSelection.CAP_CURVE);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_CURVE);
   
    /*toggle.setLabel("cap\ncurve");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;*/
    this.propertiesPanel.add(toggle);
    toggle.setState((sliceSelection.getCapType() == CrossSliceSelection.CAP_CURVE));

    xPos += 30;
    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_CAP_SQUARE.png", this.controller);
    toggle.setComponentSet(radioSet);
    toggle.addActionListener(sliceSelection, "setCapType",
        CrossSliceSelection.CAP_BUTT);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_CURVE);
    /*toggle.setLabel("cap\nsquare");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;*/
    this.propertiesPanel.add(toggle);
    toggle.setState((sliceSelection.getCapType() == CrossSliceSelection.CAP_BUTT));

    xPos += 30;
    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_CUTOFF.png", this.controller);
    toggle.setComponentSet(radioSet);
    toggle.addActionListener(sliceSelection, "setCapType",
        CrossSliceSelection.CAP_INSIDE);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_CURVE);

    /*toggle.setLabel("cap\ninside");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;*/
    this.propertiesPanel.add(toggle);
    toggle.setState((sliceSelection.getCapType() == CrossSliceSelection.CAP_INSIDE));

    xPos += 30;
    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_CAP_ROUNDRECT.png", this.controller);
    toggle.setComponentSet(radioSet);
    toggle.addActionListener(sliceSelection, "setCapType",
        CrossSliceSelection.CAP_ROUND_SQUARE);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_ROUND_SQUARE);
    /*toggle.setLabel("corner\nradius");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;*/
    this.propertiesPanel.add(toggle);
    toggle.setState((sliceSelection.getCapType() == CrossSliceSelection.CAP_ROUND_SQUARE));

   
   
   
    xPos -= 90;
    yPos = 60;
   
    toggle = new GUIToggle(xPos, yPos,"gui/GUI_MATERIAL_THROUGHALL_SLOT.png", this.controller);
    toggle.addActionListener(sliceSelection, "toggleConstrainToshape",
        UITools.LEG_TOOL);
    toggle.setLabel("through\nall");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    this.propertiesPanel.add(toggle);
    toggle.setState(!sliceSelection.cropToCurrentShape);
    xPos += 45;

   
    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLOT_ROTATE_DOWN.png","gui/GUI_SLOT_ROTATE_UP.png", this.controller);
    toggle.setController(this.controller);
    toggle.addActionListener(sliceSelection, "flipSide",
        CrossSliceSelection.CAP_INSIDE);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_CURVE);
    toggle.setLabel("flip\nslots");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toggle.setState(sliceSelection.flipSide);
    this.propertiesPanel.add(toggle);

    xPos += 45;
    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_SMOOTHED.png", this.controller);
    toggle.setController(this.controller);
    toggle.addActionListener(sliceSelection, "smooth",
        CrossSliceSelection.CAP_INSIDE);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_CURVE);
    toggle.setLabel("smooth");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toggle.setState(sliceSelection.smooth);
    this.propertiesPanel.add(toggle);

    xPos += 45;
    toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_FOLLOW_EDGE.png", this.controller);
    toggle.setController(this.controller);
    toggle.addActionListener(sliceSelection, "generateFlushTops",
        CrossSliceSelection.CAP_INSIDE);
    toggle.addActionListener(this, "rebuildChair",
        CrossSliceSelection.CAP_CURVE);
    toggle.setLabel("flush\ntops");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toggle.setState(sliceSelection.smooth);
    this.propertiesPanel.add(toggle);

    xPos += 45;
   
    if(sliceSelection.tieToLeg){
     
      toggle = new GUIToggle(xPos, yPos, "gui/GUI_SLICE_FOLLOW_EDGE.png", this.controller);
      toggle.setController(this.controller);
     
 
      toggle.addActionListener(this, "rebuildChair",
          CrossSliceSelection.CAP_CURVE);
   
     
      toggle.addActionListener(sliceSelection, "extendLegSliceToTopOfLeg",
          CrossSliceSelection.CAP_INSIDE);
     
     
     
     
      toggle.setLabel("extend\nto top");
      toggle.label.align = GUILabel.CENTRE;
      toggle.label.layout = GUILabel.UNDER_COMPONENT;
      toggle.setState(sliceSelection.extendLegSliceToTopOfLeg);
      this.propertiesPanel.add(toggle);
    }

    if (sliceSelection.type == CrossSliceSelection.SLICES
        || sliceSelection.type == CrossSliceSelection.SINGLE_SLICE
View Full Code Here

Examples of ModalGUI.GUIToggle

    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);
View Full Code Here

Examples of ModalGUI.GUIToggle

    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);
View Full Code Here

Examples of ModalGUI.GUIToggle

    GUIButton resetButton;

    gui.useAlphaMouseOver = true;

    GUIButton button;
    GUIToggle toggle;
    String TOOL_NAME = null;

    posY = 0;
    setupMenuBar(applet);

    /*
    button = new GUI.GUIButton(GLOBAL.windowWidth-100, posY, "touchButtons/GUI_NEWCHAIR_UP.png",
        "touchButtons/GUI_NEWCHAIR_DOWN.png", GLOBAL.applet);
    button.addActionListener(GLOBAL.uiTools, "newChair",
        UITools.DRAW_TOOL);
   
    button.addToolTip(GLOBAL.applet,"GUI_DRAW_TOOLTIP", LANGUAGE);
   
    gui.add(button);

   
   
   
   
    */

    toggle = new GUIToggle(GLOBAL.windowWidth - 100, posY, "touchButtons"
        + LANGUAGE + "/GUI_DRAW_UP.png", "touchButtons" + LANGUAGE
        + "/GUI_DRAW_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.DRAW_TOOL);
    gui.add(toggle);

    posY += 85;

    toggle = new GUIToggle(GLOBAL.windowWidth - 100, posY, "touchButtons"
        + LANGUAGE + "/GUI_DRAW_LEG_UP.png", "touchButtons" + LANGUAGE
        + "/GUI_DRAW_LEG_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool", UITools.LEG_TOOL);

    gui.add(toggle);

    posY += 85;

    GUISlider slider = new GUISlider(GLOBAL.windowWidth - 60, posY, 60, 20,
        50, gui);
    slider.setVal(GLOBAL.uiTools.brush_dia);
    slider.addActionListener(GLOBAL.uiTools, "changeToolWidth",
        UITools.DRAW_TOOL);
    slider.setShowValLabel(true);
    slider.setLabelValMultiplier(2.0f);

    toggle.addToolTip(GLOBAL.applet, "proButtons/GUI_DRAW_TOOLTIP",
        LANGUAGE);
    //  gui.add(slider);

    posY += 5;
    toggle = new GUIToggle(GLOBAL.windowWidth - 100, posY, "touchButtons"
        + LANGUAGE + "/GUI_EDIT_UP.png", "touchButtons" + LANGUAGE
        + "/GUI_EDIT_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SELECT_TOOL);

    gui.add(toggle);

    posY += 85;
    toggle = new GUIToggle(GLOBAL.windowWidth - 100, posY, "touchButtons"
        + LANGUAGE + "/GUI_SIT_UP.png", "touchButtons" + LANGUAGE
        + "/GUI_STAND_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "sitStand", UITools.DRAW_TOOL);

    gui.add(toggle);

    /* 
     
      posY += 140;
      toggle = new GUI.GUIToggle(GLOBAL.windowWidth-100, posY, "touchButtons"+LANGUAGE+"/GUI_CAMERAZOOM_UP.png",
          "touchButtons"+LANGUAGE+"/GUI_CAMERAZOOM_DOWN.png", GLOBAL.applet);
      toggle.addActionListener(GLOBAL.uiTools, "selectTool",
          UITools.ZOOM_CAM_TOOL);
         
      gui.add(toggle);
     
     
      toggle = new GUI.GUIToggle(GLOBAL.windowWidth-66, posY, "touchButtons"+LANGUAGE+"/GUI_CAMERAMOVE_UP.png",
          "touchButtons"+LANGUAGE+"/GUI_CAMERAMOVE_DOWN.png", GLOBAL.applet);
      toggle.addActionListener(GLOBAL.uiTools, "selectTool",
          UITools.MOVE_CAM_TOOL);
         
      gui.add(toggle);
      posY -= 60;
     
      */
    posY += 85;
    rotateCamera = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_CAMERA_ROTATE_UP.png",
        "touchButtons" + LANGUAGE + "/GUI_CAMERA_ROTATE_DOWN.png", gui);
    rotateCamera.addActionListener(GLOBAL.uiTools, "autoRotate",
        UITools.ROTATE_CAM_TOOL);

    gui.add(rotateCamera);

    posY += 85;
    patternButton = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_PATTERN_UP.png",
        "touchButtons" + LANGUAGE + "/GUI_PATTERN_DOWN.png", gui);
    patternButton.addActionListener(GLOBAL.uiTools, "toggleView",
        UITools.VIEW_SHAPE_PACK);
    gui.add(patternButton);

    posY += 85;
    savePdfButton = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_SAVEPDF_UP.png",
        "touchButtons" + LANGUAGE + "/GUI_SAVEPDF_DOWN.png", gui);
    savePdfButton.addActionListener(GLOBAL.uiTools, "savePDF",
        UITools.VIEW_SHAPE_PACK);
    savePdfButton.hide();
    gui.add(savePdfButton);

    posY += 85;
    printPdfButton = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_PRINT_UP.png", "touchButtons"
            + LANGUAGE + "/GUI_PRINT_DOWN.png", gui);
    printPdfButton.addActionListener(GLOBAL.uiTools, "print",
        UITools.VIEW_SHAPE_PACK);
    printPdfButton.hide();
    gui.add(printPdfButton);

    posY += 85;
    printRoboButton = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_CUTPLOT_UP.png",
        "touchButtons" + LANGUAGE + "/GUI_CUTPLOT_DOWN.png", gui);
    printRoboButton.addActionListener(GLOBAL.uiTools, "saveCraftRobo",
        UITools.VIEW_SHAPE_PACK);
    printRoboButton.hide();
    gui.add(printRoboButton);

    posY -= 85 * 2;

    saveChairToggle = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_SAVECHAIR_UP.png",
        "touchButtons" + LANGUAGE + "/GUI_SAVECHAIR_DOWN.png", gui);
    saveChairToggle.addActionListener(GLOBAL.uiTools, "",
        UITools.VIEW_SAVE_CHAIR);

    gui.add(saveChairToggle);
    posY += 85;

    saveChairFileButton = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_SAVECHAIRFILE_UP.png",
        "touchButtons" + LANGUAGE + "/GUI_SAVECHAIRFILE_DOWN.png", gui);
    saveChairFileButton.addActionListener(GLOBAL.uiTools,
        "saveChairToFile", UITools.DRAW_TOOL);
    saveChairFileButton.hide();
    gui.add(saveChairFileButton);
    posY += 85;

    shareChairButton = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "touchButtons" + LANGUAGE + "/GUI_SHARE_UP.png", "touchButtons"
            + LANGUAGE + "/GUI_SHARE_DOWN.png", gui);
    shareChairButton.addActionListener(SketchChairCloudhook.getInstance(),
        "ShareChairOnline", UITools.DRAW_TOOL);
    shareChairButton.hide();
    gui.add(shareChairButton);
    posY -= 85;

    toggle = new GUIToggle(GLOBAL.windowWidth - 100, posY, "touchButtons"
        + LANGUAGE + "/GUI_UNDO_UP.png", "touchButtons" + LANGUAGE
        + "/GUI_UNDO_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "undo", UITools.DRAW_TOOL);

    gui.add(toggle);

    posY += 85;
    toggle = new GUIToggle(GLOBAL.windowWidth - 100, posY,
        "/GUI_DELETE_UP.png", "/GUI_DELETE_DOWN.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "deleteLastChair",
        UITools.DRAW_TOOL);

    gui.add(toggle);

   
View Full Code Here

Examples of ModalGUI.GUIToggle

  static void setupGUITabsAll(PApplet applet, ModalGUI gui) {
   
   
   
    GUIToggle toggle = null;
    float posX= 0; float posY = 0;
    float button_width = 45;
    float button_height = 45;
   
    GLOBAL.uiTools.toggleSet.reset();
   
   
   
    GLOBAL.previewWidget = new WidgetPreviewPanel(GLOBAL.windowWidth -260, 0,260,GLOBAL.windowHeight-250, gui);
    gui.add(GLOBAL.previewWidget);
   
   
   

    /*
    GUIButton imgB = new GUIButton(0, 0, "SketchCHAIRtittle.png",
        "SketchCHAIRtittleOVER.png", gui);
    imgB.addActionListener(GLOBAL.uiTools, "gotoWebsite", null);
    gui.add(imgB);
    */
    /*

    GUIToggleSlide sliderToggle = new GUIToggleSlide(GLOBAL.windowWidth -110, 18, "basic",
        "expert", gui);
    sliderToggle.addActionListener(GLOBAL.uiTools, "toggleExpert", null);
    sliderToggle.isDown = !SETTINGS.EXPERT_MODE;
    gui.add(sliderToggle);
    */
   
   
   
   
    /*
   
    //camera
     *
     *
   
    tabbedPanel.addTabbedPanel(cameraPanel, "camera", gui);
*/
    //toggleSet = new GUIComponentSet();

   
     button_width = 25;

    GLOBAL.patternCameraPanel = new GUIPanel(0f, 10f, (int) 0,(int) 0, gui);
    gui.add(GLOBAL.patternCameraPanel);
    GLOBAL.patternCameraPanel.renderBorder =false;
   
    toggle = new GUIToggle(posX, posY, button_width, button_width,
        "gui/camera_zoom.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.ZOOM_CAM_TOOL);
    //toggle.setLabel("zoom");
    //toggle.label.align = GUILabel.CENTRE;
    //toggle.label.layout = GUILabel.UNDER_COMPONENT;

    GLOBAL.patternCameraPanel.add(toggle);

    posX += button_width+5;

 

    toggle = new GUIToggle(posX, posY, button_width, button_width,
        "gui/camera_move.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MOVE_CAM_TOOL);
    //toggle.setLabel("move");
    //toggle.label.align = GUILabel.CENTRE;
    //toggle.label.layout = GUILabel.UNDER_COMPONENT;

    GLOBAL.patternCameraPanel.add(toggle);

   
   
    GLOBAL.patternCameraPanel.hide();
   
   
   
   
   
   
    GLOBAL.cameraPanel = new GUIPanel(0f, 10f, (int) 0,(int) 0, gui);
    gui.add(GLOBAL.cameraPanel);
    GLOBAL.cameraPanel.renderBorder =false;
   
     posX = 0;
     posY = 0;
   
   
    
    
     GUIComponentSet physicsSet = new GUIComponentSet();
     //Physics
    
      toggle = new GUIToggle(posX, posY, button_width, button_width,
          "gui/GUI_PHYSICS_PLAY.png","gui/GUI_PHYSICS_PAUSE.png", gui);
      toggle.setComponentSet(physicsSet);
      toggle.addActionListener(GLOBAL.uiTools, "physicsPlayPause",
          UITools.ZOOM_CAM_TOOL);
      //toggle.setLabel("play");
      //toggle.label.align = GUILabel.CENTRE;
      //toggle.label.layout = GUILabel.UNDER_COMPONENT;

      GLOBAL.cameraPanel.add(toggle);

     
      posX += button_width+5;

     
      toggle = new GUIToggle(posX, posY, button_width, button_width,
          "gui/GUI_PHYSICS_STOP.png", gui);
      toggle.setComponentSet(physicsSet);
      toggle.addActionListener(GLOBAL.uiTools, "physicsRewind",
          UITools.ZOOM_CAM_TOOL);
      //toggle.setLabel("stop");
      //toggle.label.align = GUILabel.CENTRE;
      //toggle.label.layout = GUILabel.UNDER_COMPONENT;

      GLOBAL.cameraPanel.add(toggle);

      posX += button_width+25;
     
      //GUILabel label = new GUILabel(posX, posY,"view",gui);
      //gui.add(label);
     
    toggle = new GUIToggle(posX, posY, button_width, button_width,
        "gui/camera_zoom.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.ZOOM_CAM_TOOL);
    //toggle.setLabel("zoom");
    //toggle.label.align = GUILabel.CENTRE;
    //toggle.label.layout = GUILabel.UNDER_COMPONENT;

    GLOBAL.cameraPanel.add(toggle);

    posX += button_width+5;

 

    toggle = new GUIToggle(posX, posY, button_width, button_width,
        "gui/camera_move.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MOVE_CAM_TOOL);
    //toggle.setLabel("move");
    //toggle.label.align = GUILabel.CENTRE;
    //toggle.label.layout = GUILabel.UNDER_COMPONENT;

    GLOBAL.cameraPanel.add(toggle);

    posX += button_width+5;

   
    toggle = new GUIToggle(posX, posY, button_width, button_width,
        "gui/camera_rotate.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.ROTATE_CAM_TOOL);
    //toggle.setLabel("rotate");
    //toggle.label.align = GUILabel.CENTRE;
    //toggle.label.layout = GUILabel.UNDER_COMPONENT;

View Full Code Here

Examples of ModalGUI.GUIToggle

        GLOBAL.windowHeight - panelHeight, (int) GLOBAL.windowWidth,
        (int) panelHeight, gui);
    tabbedPanel.addTabbedPanel(toolPanel, "tools", gui);


    GUIToggle toggle = new GUIToggle(posX, posY, button_width,
        button_height, "gui/draw.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_TOOL);
    toggle.setLabel("brush");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.DRAW_TOOL)
      toggle.toggleDown();
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/add_leg.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.LEG_TOOL);
    toggle.addActionListener(GLOBAL.uiTools, "selectLegPlanes",
        SketchTools.LEG_TOOL);
    toggle.setLabel("leg");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.LEG_TOOL)
      toggle.toggleDown();
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/select.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.SELECT_TOOL);
    toggle.setLabel("select");
   
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.SELECT_TOOL)
      toggle.toggleDown();
   
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(120, posY, button_width, button_height,
        "gui/sit.png", "gui/stand.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "sitStand", UITools.DRAW_TOOL);
    toggle.setLabel("sit/stand");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(120, posY, button_width, button_height,
        "gui/camera_rotate.png", gui);
    toggle.addActionListener(GLOBAL.uiTools, "autoRotate",
        UITools.DRAW_TOOL);
    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,
View Full Code Here

Examples of ModalGUI.GUIToggle

    GUIPanel toolPanel = new GUIPanel(0f,0f, (int) tabbedPanel.getWidth(),
        (int) panelHeight, gui);
    tabbedPanel.addTabbedPanel(toolPanel, "tools","gui/GUI_TAB_EDIT_UP.png","gui/GUI_TAB_EDIT_DOWN.png", gui);


    GUIToggle toggle = new GUIToggle(posX, posY, button_width,
        button_height, "gui/draw.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_TOOL);
    toggle.setLabel("brush");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
   
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.DRAW_TOOL)
      toggle.toggleDown();
   
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/add_leg.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.LEG_TOOL);
    toggle.setLabel("leg");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;

    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.LEG_TOOL)
      toggle.toggleDown();
   
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/select.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.SELECT_TOOL);
    toggle.setLabel("select");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;


    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.SELECT_TOOL)
      toggle.toggleDown();
   
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/draw_path.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_PATH_TOOL);
    toggle.setLabel("path");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.DRAW_PATH_TOOL)
      toggle.toggleDown();
   
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/GUI_OFFSET_PATH_ICON.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.DRAW_OFFSETPATH_TOOL);
    toggle.setLabel("offset path");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.DRAW_OFFSETPATH_TOOL)
      toggle.toggleDown();
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/bezier.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools.SketchTools, "selectTool",
        SketchTools.SELECT_BEZIER_TOOL);
    toggle.setLabel("bezier");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    if (GLOBAL.uiTools.SketchTools.getCurrentTool() == SketchTools.SELECT_BEZIER_TOOL)
      toggle.toggleDown();
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/measure.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.MEASURE_TOOL);
    toggle.setLabel("measure");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    if (GLOBAL.uiTools.getCurrentTool() == UITools.MEASURE_TOOL)
      toggle.toggleDown();
    toolPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/scale.png", gui);
    toggle.setComponentSet(GLOBAL.uiTools.toggleSet);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SCALE_TOOL);
    toggle.setLabel("scale");
    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);

    GLOBAL.widgetToolSettings = new WidgetToolSettings(600, 0, 250,
        toolPanel.getHeight(), gui);
    toolPanel.add(GLOBAL.widgetToolSettings);

    /*
     *
     *
     *
     *
        ______
    _______/layers/____________________________________________________________________________

    Selecting and editing layers
    
     */

    GUIPanel LayerPanel = new GUIPanel(0f, 0f, (int) tabbedPanel.getWidth(), (int) panelHeight, gui);
    tabbedPanel.addTabbedPanel(LayerPanel, "layers","gui/GUI_TAB_LAYERS_UP.png","gui/GUI_TAB_LAYERS_DOWN.png", gui);

    GLOBAL.planesWidget = new WidgetPlanes(0, 0, 900, 100, gui);
    //GLOBAL.planesWidget.setup();

    LayerPanel.add(GLOBAL.planesWidget);

    /*
     *
     *
     *
     *
        ______
    _______/slices/____________________________________________________________________________

    Selecting and editing slices
    
     */
    GUIPanel slicesPanel = new GUIPanel(0f, 0f, tabbedPanel.getWidth(), (int) panelHeight, gui);
    tabbedPanel.addTabbedPanel(slicesPanel, "slices","gui/GUI_TAB_SLICES_UP.png","gui/GUI_TAB_SLICES_DOWN.png", gui);

    GLOBAL.toggleSetSlices = new GUIComponentSet();

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/GUI_SLICE_SLICE_BUTTON.png", gui);
    toggle.setComponentSet(GLOBAL.toggleSetSlices);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SLICES_SINGLE_SLICE);
    toggle.setLabel("slice");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    slicesPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/GUI_SLICE_MULTISLICE_BUTTON.png", gui);
    toggle.setComponentSet(GLOBAL.toggleSetSlices);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SLICES_GROUP_SLICES);
    toggle.setLabel("slice" + '\n' + "group");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    slicesPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/GUI_SLICE_SLAT_BUTTON.png", gui);
    toggle.setComponentSet(GLOBAL.toggleSetSlices);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SLICES_SINGLE_SLAT);
    toggle.setLabel("slat");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    slicesPanel.placeComponent(toggle);

    toggle = new GUIToggle(posX, posY, button_width, button_height,
        "gui/GUI_SLICE_SLAT_BUTTON.png", gui);
    toggle.setComponentSet(GLOBAL.toggleSetSlices);
    toggle.addActionListener(GLOBAL.uiTools, "selectTool",
        UITools.SLICES_SLATSLICE_GROUP);
    toggle.setLabel("slatSlice" + '\n' + "group");
    toggle.label.align = GUILabel.CENTRE;
    toggle.label.layout = GUILabel.UNDER_COMPONENT;
    slicesPanel.placeComponent(toggle);

    GLOBAL.slicesWidget = new WidgetSlices(250, 0, 300, panelHeight, gui);
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.