Package g4p_controls.HotSpot

Examples of g4p_controls.HotSpot.HSrect


    buffer.rectMode(PApplet.CORNER);
    buffer.g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
        RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
    opaque = false;
    hotspots = new HotSpot[]{
        new HSrect(1, 0, 0, width, height)    // control surface
    };
  }
View Full Code Here


    buffer.g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
        RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
    buffer.g2.setFont(G4P.numericLabelFont);
    hotspots = new HotSpot[]{
        new HScircle(THUMB_SPOT, width/2 + (parametricPos - 0.5f) * trackLength, height/2, trackWidth/2 )// thumb
        new HSrect(TRACK_SPOT, (width-trackLength)/2, (height-trackWidth)/2, trackLength, trackWidth),    // track
    };
    z = Z_SLIPPY;

    epsilon = 0.98f / trackLength;

View Full Code Here

  public GScrollbar(PApplet theApplet, float p0, float p1, float p2, float p3) {
    super(theApplet, p0, p1, p2, p3);
    buffer = (PGraphicsJava2D) winApp.createGraphics((int)width, (int)height, PApplet.JAVA2D);
    buffer.rectMode(PApplet.CORNER);
    hotspots = new HotSpot[]{
        new HSrect(1, 0, 0, 16, height),      // low cap
        new HSrect(2, width - 16, 0, 16, height)// high cap
        new HSrect(9, 17, 0, width - 17, height// thumb track
    };

    lowCap = new RoundRectangle2D.Float(1, 1, 15, height-2, 6, 6);
    highCap = new RoundRectangle2D.Float(width - 15, 1, 14.5f, height-2, 6, 6);
View Full Code Here

    // The image buffer is just for the typing area
    buffer = (PGraphicsJava2D) winApp.createGraphics((int)width, (int)height, PApplet.JAVA2D);
    buffer.rectMode(PApplet.CORNER);
    buffer.g2.setFont(localFont);
    hotspots = new HotSpot[]{
        new HSrect(1, tx, ty, tw, th),      // typing area
        new HSrect(9, 0, 0, width, height)    // control surface
    };
    G4P.pushStyle();
    G4P.showMessages = false;
    z = Z_STICKY;
    G4P.control_mode = GControlMode.CORNER;
View Full Code Here

    buffer = (PGraphicsJava2D) winApp.createGraphics((int)width, (int)height, PApplet.JAVA2D);
    buffer.g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
        RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
    buffer.g2.setFont(G4P.numericLabelFont);
    hotspots = new HotSpot[]{
        new HSrect(THUMB_SPOT, dragD - HALF_THUMB_SIZE + parametricPosX * dragWidth,
            dragD - HALF_THUMB_SIZE + parametricPosY * dragHeight, THUMB_SIZE, THUMB_SIZE )// thumb
        new HSrect(TRACK_SPOT, dragD, dragD, dragWidth, dragHeight)    // track
    };
    z = Z_SLIPPY;

    epsilon = 0.98f / PApplet.max(dragWidth, dragHeight);
    opaque = true;
View Full Code Here

    // The image buffer is just for the typing area
    buffer = (PGraphicsJava2D) winApp.createGraphics((int)width, (int)height, PApplet.JAVA2D);
    buffer.rectMode(PApplet.CORNER);
    buffer.g2.setFont(localFont);
    hotspots = new HotSpot[]{
        new HSrect(1, tx, ty, tw, th),      // typing area
        new HSrect(9, 0, 0, width, height)    // control surface
    };
   
    G4P.pushStyle();
    G4P.showMessages = false;
View Full Code Here

  /**
   * This needs to be called if the tab text is changed
   */
  private void calcHotSpots(){
    hotspots = new HotSpot[]{
        new HSrect(COLLAPSED_BAR_SPOT, 0, 0, tabWidth, tabHeight),      // tab text area
        new HSrect(EXPANDED_BAR_SPOT, 0, 0, width, tabHeight),        // tab non-text area
        new HSrect(SURFACE_SPOT, 0, tabHeight, width, height - tabHeight// panel content surface
    };
  }
View Full Code Here

        RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
    buffer.g2.setFont(G4P.numericLabelFont);
    buffer.imageMode(PApplet.CENTER);
    hotspots = new HotSpot[]{
        new HSalpha(THUMB_SPOT, width/2 + (parametricPos - 0.5f) * trackLength, height/2, thumb, PApplet.CENTER)// thumb
        new HSrect(TRACK_SPOT, (width-trackLength)/2, (height-trackWidth)/2, trackLength, trackWidth),    // track
    };
    opaque = false;
    z = Z_SLIPPY;

    epsilon = 0.98f / trackLength;
View Full Code Here

    // The image buffer is just for the button surface
    buffer = (PGraphicsJava2D) winApp.createGraphics((int)width, (int)height, PApplet.JAVA2D);
    buffer.rectMode(PApplet.CORNER);
    buffer.g2.setFont(localFont);
    hotspots = new HotSpot[]{
        new HSrect(1, 0, 0, width, height)    // control surface
    };
    setText(text);
    z = Z_SLIPPY;
    // Now register control with applet
    createEventHandler(G4P.sketchApplet, "handleButtonEvents",
View Full Code Here

    G4P.popStyle();

    buffer.g2.setFont(localFont);
    hotspots = new HotSpot[]{
        new HSrect(LIST_SURFACE, 0, itemHeight+1, width - 11, height - itemHeight - 1)// text list area
        new HSrect(CLOSED_SURFACE, 0, 0, width - buttonWidth, itemHeight)        // selected text display area
    };

    createEventHandler(G4P.sketchApplet, "handleDropListEvents",
        new Class<?>[]{ GDropList.class, GEvent.class },
        new String[]{ "list", "event" }
View Full Code Here

TOP

Related Classes of g4p_controls.HotSpot.HSrect

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.