Package ModalGUI

Examples of ModalGUI.GUINumberfield


    }

    if (sliceSelection.type == CrossSliceSelection.SLICES
        || sliceSelection.type == CrossSliceSelection.SINGLE_SLICE
        || sliceSelection.type == CrossSliceSelection.SLATSLICES) {
      GUINumberfield slatHeight = new GUINumberfield(xPos, yPos, 30, 15,
          this.controller);
      slatHeight.addActionListener(sliceSelection, "slatHeight");
      String sHeight = Float.toString(sliceSelection.getSlatHeight());
      if (sliceSelection.getSlatHeight() == 0)
        sHeight = "";

      slatHeight.setText(sHeight);
      slatHeight.setLabel("slice\nheight");
      slatHeight.label.align = GUILabel.CENTRE;
      slatHeight.label.layout = GUILabel.UNDER_COMPONENT;
      this.propertiesPanel.add(slatHeight);
    }

    if (sliceSelection.type == CrossSliceSelection.SLATSLICES
        || sliceSelection.type == CrossSliceSelection.PLANE_ON_EDGE) {

      GUINumberfield slatHeight = new GUINumberfield(230, 45, 60, 15,
          this.controller);
      slatHeight.addActionListener(sliceSelection, "teethCount");
      String sHeight = Float.toString(sliceSelection.teethCount);
      slatHeight.setText(sHeight);
      slatHeight.setLabel("teeth count");
      this.propertiesPanel.add(slatHeight);

      GUINumberfield fingerTollerance = new GUINumberfield(230, 65, 60,
          15, this.controller);
      fingerTollerance.addActionListener(sliceSelection,
          "fingerTollerance");
      String fingetTol = Float.toString(sliceSelection.fingerTollerance);
      fingerTollerance.setText(fingetTol);
      fingerTollerance.setLabel("finger tollerance");
      this.propertiesPanel.add(fingerTollerance);
    }
    //this.scrollPanel.add(labelButton);

    /*
 
View Full Code Here


    scaleSlider.setLabelValMultiplier(1.0f);
    scaleSlider.setEndImgs(GLOBAL.applet.loadImage("gui/SLIDER_DESIGN_SCALE_MIN.png"),GLOBAL.applet.loadImage("gui/SLIDER_DESIGN_SCALE_MAX.png"));
    add(scaleSlider);
   
   
    slotSizeTextfield = new GUINumberfield(70, 70,
        60, 15, gui);
   


    slotSizeTextfield.setText(
        Float.toString(SETTINGS.materialThickness));
    slotSizeTextfield.setLabel("mm (d)");

    add(slotSizeTextfield);
    slotSizeTextfield.setParentPanel(
        this);
   
   
   
   
   
    label = new GUILabel(250, 30, "width", gui);
    add(label);
    GUINumberfield numberField = new GUINumberfield(300, 30, 60, 15, gui);
    numberField.setLabel("mm (w)");
    numberField.setText(String.valueOf(GLOBAL.shapePack.materialWidth));
    numberField.addActionListener(GLOBAL.shapePack, "materialWidth");
    add(numberField);

    label = new GUILabel(250, 50, "height", gui);
    add(label);
    numberField = new GUINumberfield(300, 50, 60, 15, gui);
    numberField.setLabel("mm (h)");
    numberField.setText(String.valueOf(GLOBAL.shapePack.materialHeight));
    numberField.addActionListener(GLOBAL.shapePack, "materialHeight");
    add(numberField);
   
   
   
   
    /*
    scaleTextfield = new GUITextfield(160, 30, 30,
        15, gui);
    scaleTextfield
        .setText((int) (1 / SETTINGS.scale) + "");
   
    scaleTextfield.addActionListener(null,
        "mirrorPlanesToggle", UITools.LEG_TOOL);
    add(scaleTextfield);
    scaleTextfield.setParentPanel(this);
   
    scaleTextfield.setLabel("chair scale");
    GUILabel scalelabel = new GUILabel(145, 30, "1:", gui);
    add(scalelabel);
*/
    /*
    numberField = new GUINumberfield(150, 15, 60, 15, gui);
    numberField.setLabel("extendSlots");
    numberField.setText("0");
    numberField.addActionListener(GLOBAL.SketchGlobals, "extendSlots");
    materialsPanel.add(numberField);
    */
   
    //label = new GUILabel(300, 15, "pattern features", gui);
    //add(label);

    GUIToggle toggle;
 
    toggleDogbones = new GUIToggle(500, 15, toggleSize, toggleSize, "gui/GUI_MATERIAL_DOGBONE_SLOT.png",gui);
    toggleDogbones.addActionListener(GLOBAL.shapePack, "addDogbones");
    toggleDogbones.setLabel("add dogbones");
    //toggle.label.align = GUILabel.CENTRE; toggle.label.layout = GUILabel;
    add(toggleDogbones);

    toggle = new GUIToggle(500, 40, toggleSize, toggleSize, "gui/GUI_MATERIAL_SEPERATE_SLOT.png",gui);
    toggle.addActionListener(GLOBAL.SketchGlobals, "seperate_slots");
    toggle.setLabel("seperate slots");
    //toggle.label.align = GUILabel.CENTRE; toggle.label.layout = GUILabel.UNDER_COMPONENT;
    add(toggle);

    toggle = new GUIToggle(500, 65, toggleSize, toggleSize, "gui/GUI_MATERIAL_BEVEL_SLOT.png",gui);
    toggle.addActionListener(GLOBAL.shapePack, "add_guide_divets");
    toggle.setLabel("is paper cut");
    //toggle.label.align = GUILabel.CENTRE; toggle.label.layout = GUILabel;
    add(toggle);

    cuttingBitSize = new GUINumberfield(650, 15, 30, 15, gui);
    cuttingBitSize.setLabel("bit size(mm)");
    cuttingBitSize.setText("5");
    cuttingBitSize.addActionListener(GLOBAL.shapePack, "inner_corner_radius");
   
    add(cuttingBitSize);
View Full Code Here

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

    slotSizeTextfield.setText(
        Float.toString(SETTINGS.DEFAULT_MATERIAL_WIDTH));
    slotSizeTextfield.setLabel("mm:   material width");
View Full Code Here

TOP

Related Classes of ModalGUI.GUINumberfield

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.