Package ModalGUI

Examples of ModalGUI.GUIPanel


    GUIPanelTabbed tabbedPanel = new GUIPanelTabbed(0f, height
        - panelHeight, (int) width, (int) panelHeight, gui);
    gui.add(tabbedPanel);

    //tools
    GUIPanel toolPanel = new GUIPanel(0f, height - panelHeight,
        (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


  public void setupButtons() {

    LANGUAGE = "JP";

    float panelX = 200;
    this.panel = new GUIPanel(0, 0, 300f, 100f, this.controller);
    //this.panel.setLabel("slices");
    this.panel.hideSelectBar = true;
    this.hideSelectBar = true;
    this.panel.renderBorder = false;
    this.renderBorder = false;
   
    this.add(this.panel);

    this.scrollPanel = new GUIPanel(0, 0, 190f, 100f, this.gui);
    this.scrollPanel.setParentPanel(panel);
    this.scrollPanel.isDraggable = false;
    this.scrollPanel.useScroolBarX = true;
    this.scrollPanel.hideSelectBar = true;
    this.scrollPanel.useCanvas = true;
    this.scrollPanel.renderBorder = false;

    this.add(this.scrollPanel);

    this.propertiesPanel = new GUIPanel(190, 0, 900f, 100f, this.gui);
    this.propertiesPanel.setParentPanel(this);
    this.propertiesPanel.isDraggable = false;
    this.propertiesPanel.useScroolBarX = true;
    this.propertiesPanel.hideSelectBar = true;
    this.propertiesPanel.useCanvas = true;
View Full Code Here

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

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


    //panel for slice widget
    float slicePanleWidth = 100;
    float slicePanleHeight = 100;
    GLOBAL.slicePanel = new GUIPanel(GLOBAL.windowWidth - slicePanleWidth,
        0, slicePanleWidth, slicePanleHeight, gui);
    GLOBAL.slicePanel.invisible();
    gui.add(GLOBAL.slicePanel);
   
    GLOBAL.slicesWidget = new WidgetSlices(240, 0, 300, slicePanleHeight, gui);
    GLOBAL.planesWidget = new WidgetPlanes(0, 0, 900, slicePanleHeight, gui);

   
   

    setupGUITabsAll(applet,gui);

    GUIPanelTabbed tabbedPanel = new GUIPanelTabbed(0f, GLOBAL.windowHeight
        - panelHeight, (int) GLOBAL.windowWidth, (int) panelHeight, gui);
    gui.add(tabbedPanel);
    GLOBAL.designToolbarBasic = tabbedPanel;

    //tools
    GUIPanel toolPanel = new GUIPanel(0f,
        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,
        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);

    /*
    button = new GUIButton(GLOBAL.windowWidth - 80, posY + 10,
        button_width, button_height, "gui/GUI_SLICE_DELETE_BUTTON.png",
        null, gui);
View Full Code Here

   
    //panel for slice widget
    float slicePanleWidth = 100;
    float slicePanleHeight = 100;
    GLOBAL.slicePanel = new GUIPanel(GLOBAL.windowWidth - slicePanleWidth,
        0, slicePanleWidth, slicePanleHeight, gui);
    GLOBAL.slicePanel.invisible();
    gui.add(GLOBAL.slicePanel);
    setupGUITabsAll(applet,gui);

    /*
    sliderToggle = new GUIToggleSlide(GLOBAL.windowWidth - 100, 18,
        "3D Preview on", "off", gui);
    sliderToggle.isDown = true;
    sliderToggle.addActionListener(GLOBAL.uiTools, "render3dPreview", null);
    gui.add(sliderToggle);
     */

    GUIPanelTabbed tabbedPanel = new GUIPanelTabbed((GLOBAL.windowWidth-panelWidth)/2.0f, GLOBAL.windowHeight
        - panelHeight, (int) panelWidth, (int) panelHeight, gui);
    gui.add(tabbedPanel);
    GLOBAL.designToolbarAdvanced = tabbedPanel;

    /*
          ______
    _________/tools/____________________________________________________________________________
   
    Tools tab hold tools for manipulating design
    */

    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);
    GLOBAL.slicesWidget.setupButtons();
    slicesPanel.add(GLOBAL.slicesWidget);

   
    /*
    button = new GUIButton(GLOBAL.windowWidth - 80,
        GLOBAL.windowHeight - 100, button_width, button_height,
View Full Code Here

   

    //panel for slice widget
    float slicePanleWidth = 100;
    float slicePanleHeight = 100;
    GLOBAL.slicePanel = new GUIPanel(GLOBAL.windowWidth - slicePanleWidth,
        0, slicePanleWidth, slicePanleHeight, gui);
    GLOBAL.slicePanel.invisible();
    gui.add(GLOBAL.slicePanel);



    /*
    sliderToggle = new GUIToggleSlide(GLOBAL.windowWidth - 100, 18,
        "3D Preview on", "off", gui);
    sliderToggle.isDown = true;
    sliderToggle.addActionListener(GLOBAL.uiTools, "render3dPreview", null);
    gui.add(sliderToggle);
     */

    GUIPanelTabbed tabbedPanel = new GUIPanelTabbed((GLOBAL.windowWidth-panelWidth)/2, GLOBAL.windowHeight
        - panelHeight, (int) panelWidth, (int) panelHeight, gui);
    gui.add(tabbedPanel);
    GLOBAL.designToolbarPattern = tabbedPanel;

    //tools
    GUIPanel toolPanel = new GUIPanel((GLOBAL.windowWidth-panelWidth)/2,
        GLOBAL.windowHeight - panelHeight, panelWidth,
        (int) panelHeight, gui);
    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
    GLOBAL.widgetMaterials =  new WidgetMaterials(0f, GLOBAL.windowHeight
        - panelHeight, (int) panelWidth, (int) panelHeight, gui);
   
View Full Code Here

    //}
  }

  public void setupGUI(ModalGUI gui, PApplet applet) {

    this.panel = new GUIPanel(GLOBAL.windowWidth - 240, 220, 220f, 110f,
        true, applet, gui);
    gui.add(this.panel);
    this.panel.setLabel("environments");

    /*
 
View Full Code Here

  public void setupGUI(PApplet applet, ModalGUI gui) {
    String LANGUAGE = "ENG";

   
    float panelX = 10;
    this.panel = new GUIPanel(GLOBAL.windowWidth - 240, 7, 220f, 70f, gui);
    gui.add(this.panel);

    this.panel.setLabel("materials");

    slotSizeTextfield = new GUINumberfield(panelX, 25, 60, 15, gui);
View Full Code Here


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

    this.scrollPanel = new GUIPanel(0, borderTop, window.getWidth(),
        window.getHeight() - (borderTop), true, applet, gui);
    this.scrollPanel.setParentPanel(window);
    this.scrollPanel.isDraggable = false;
    this.scrollPanel.useScroolBarY = true;
    this.scrollPanel.hideSelectBar = true;
View Full Code Here

TOP

Related Classes of ModalGUI.GUIPanel

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.