Package javax.swing

Examples of javax.swing.DefaultBoundedRangeModel


  public void setRange(int minimum, int maximum) {
    this.minimum.set(minimum);
    this.maximum.set(maximum);
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        BoundedRangeModel model = new DefaultBoundedRangeModel();
        model.setMinimum(ThreadsafeProgressBar.this.minimum.get());
        model.setMaximum(ThreadsafeProgressBar.this.maximum.get());
        progressBar.setModel(model);
      }
    });
  }
View Full Code Here


  private static final Logger LOG = LoggerFactory.getLogger(Progress.class);

  private BoundedRangeModel range;

  public Progress() {
    this.range = new DefaultBoundedRangeModel(60, 0, 0, 100);
  }
View Full Code Here

    BoundedRangeModel model = (BoundedRangeModel) progress.getValue();

    if (model == null) {
      LOG.warn("'null' value found! Using dummy Model instead!");
      model = new DefaultBoundedRangeModel(0, 1, 0, 100);
    }

    Object title = progress.getAttributes().get(Attributes.TIP);
    if (title == null) {
      title = Integer.toString(100 * model.getValue()
 
View Full Code Here

    BoundedRangeModel model = (BoundedRangeModel) component.getValue();

    if (model == null) {
      LOG.warn("'null' value found! Using dummy Model instead!");
      model = new DefaultBoundedRangeModel(4, 1, 0, 10);
    }

    ResponseWriter writer = facesContext.getResponseWriter();

    writer.startElement("table", null);
View Full Code Here

    BoundedRangeModel model = (BoundedRangeModel) component.getValue();

    if (model == null) {
      LOG.warn("'null' value found! Using dummy Model instead!");
      model = new DefaultBoundedRangeModel(40, 1, 0, 100);
    }

    String image = ResourceManagerUtil.getImageWithPath(facesContext, "image/1x1.gif");

    String value1 = Integer.toString(model.getValue());
View Full Code Here

    /**
     * Constructor for the ProgressTest object
     */
    ProgressTest() {
      setLayout(new BorderLayout());
      final BoundedRangeModel model = new DefaultBoundedRangeModel(0, 0, 0, 100);

      JProgressBar progress = new JProgressBar(model);
      add("South", progress);

      JSlider slider = new JSlider(model);
      add("North", slider);

      slider = new JSlider(JSlider.VERTICAL);
      slider.setModel(model);
      add("West", slider);

      progress = new JProgressBar(JProgressBar.VERTICAL);
      progress.setModel(model);
      add("East", progress);

      new Timer(50, new ActionListener() {
        int counter = 0;

        public void actionPerformed(ActionEvent e) {
          if (model.getValue() >= 100) {
            counter += 20;
            if (counter >= 500) model.setValue(0);
          } else {
            model.setValue(model.getValue() + 2);
            counter = 0;
          }
        }
      }).start();
    }
View Full Code Here

  public TabbedView(TabbedPaneViewContainer tabbedPane, String title) {

    this.title = title;
    this.tabbedPane = tabbedPane;
    this.rangeModel = new DefaultBoundedRangeModel();
    rangeModel.addChangeListener(this);
    setLayout(new BorderLayout());
  }
View Full Code Here

     * @param lowValue - the current low value shown by the range slider's bar.
     * @param highValue - the current high value shown by the range slider's bar.
     * @param orientation - construct a horizontal or vertical slider?
     */
    public JRangeSlider(int minimum, int maximum, int lowValue, int highValue, int orientation) {
        this(new DefaultBoundedRangeModel(lowValue, highValue - lowValue, minimum, maximum),
                orientation,LEFTRIGHT_TOPBOTTOM);
    }
View Full Code Here

     * @param highValue - the current high value shown by the range slider's bar.
     * @param orientation - construct a horizontal or vertical slider?
     * @param direction - Is the slider left-to-right/top-to-bottom or right-to-left/bottom-to-top
     */
    public JRangeSlider(int minimum, int maximum, int lowValue, int highValue, int orientation, int direction) {
        this(new DefaultBoundedRangeModel(lowValue, highValue - lowValue, minimum, maximum),
                orientation, direction);
    }
View Full Code Here

  private static final Logger LOG = LoggerFactory.getLogger(Progress.class);

  private BoundedRangeModel range;

  public Progress() {
    this.range = new DefaultBoundedRangeModel(60, 0, 0, 100);
  }
View Full Code Here

TOP

Related Classes of javax.swing.DefaultBoundedRangeModel

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.