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);