Exemple #1
0
  /**
   * Aqua version.
   *
   * @param leftUp the left or up number of pixels
   * @param rightDown the right or down number of pixels
   * @param tick the number of pixels for each tick
   * @return a default look and feel slider bar
   */
  public static SliderSettings getAqua(int leftUp, int rightDown, int tick) {
    ResourceReference background = new ResourceReference(Slider.class, "style/aqua/aqua_bg.png");
    ResourceReference thumb = new ResourceReference(Slider.class, "style/aqua/aqua_thumb.gif");
    ResourceReference leftCorner = new ResourceReference(Slider.class, "style/aqua/aqua_left.png");
    ResourceReference leftTick =
        new ResourceReference(Slider.class, "style/aqua/aqua_left_tick.png");
    ResourceReference rightCorner =
        new ResourceReference(Slider.class, "style/aqua/aqua_right.png");
    ResourceReference rightTick =
        new ResourceReference(Slider.class, "style/aqua/aqua_right_tick.png");

    SliderSettings defSettings = new SliderSettings();
    defSettings.setResources(
        leftUp,
        rightDown,
        tick,
        background,
        thumb,
        leftCorner,
        leftTick,
        rightCorner,
        rightTick,
        true);
    return defSettings;
  }
Exemple #2
0
  /**
   * returns a default SliderSettings. This returns all the deafult images for the slider, but does
   * not include the sizes. at the time this is created, it only knows the 6 images that make up
   * this deafult looking slider.
   *
   * @param leftUp the left or up number of pixels
   * @param rightDown the right or down number of pixels
   * @param tick the number of pixels for each tick
   * @return a default look and feel slider bar
   */
  public static SliderSettings getDefault(int leftUp, int rightDown, int tick) {
    ResourceReference background = new ResourceReference(Slider.class, "style/bg.png");
    ResourceReference thumb = new ResourceReference(Slider.class, "style/thumb.png");
    ResourceReference leftCorner = new ResourceReference(Slider.class, "style/left.gif");
    ResourceReference leftTick = new ResourceReference(Slider.class, "style/left_tick.gif");
    ResourceReference rightCorner = new ResourceReference(Slider.class, "style/right.gif");
    ResourceReference rightTick = new ResourceReference(Slider.class, "style/right_tick.gif");

    SliderSettings defSettings = new SliderSettings();
    defSettings.setResources(
        leftUp,
        rightDown,
        tick,
        background,
        thumb,
        leftCorner,
        leftTick,
        rightCorner,
        rightTick,
        false);
    return defSettings;
  }