Package javax.swing

Examples of javax.swing.DefaultBoundedRangeModel


    super();
   
    parseCommands(args);
   
    numDrawableFeatures = 1;
    setProgress(new DefaultBoundedRangeModel());
   
    String fileName = args[args.length - 2];
    FeatFile fF = null;
    EDLFile eF = null;
   
View Full Code Here


          return 1;
        }
      });

    setModel(
      new DefaultBoundedRangeModel(
        priorityList.indexOf(Level.TRACE), 0, 0, priorityList.size() - 1));

    Hashtable labelMap = new Hashtable();

    for (Iterator iter = priorityList.iterator(); iter.hasNext();) {
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

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

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

    TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);

    String value1 = Integer.toString(model.getValue());
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);
    }

    final int diff = model.getMaximum() - model.getMinimum();
    Object title = progress.getAttributes().get(Attributes.TIP);
    if (title == null && diff > 0) {
View Full Code Here

  @PostConstruct
  public void update() {
    MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
    MemoryUsage memory = memoryBean.getHeapMemoryUsage();
    memoryUsage = new DefaultBoundedRangeModel(Long.valueOf(memory.getUsed() / 1024).intValue(),
        0, 0, Long.valueOf(memory.getMax() / 1024).intValue());
    int percentValue = memoryUsage.getValue() / (memoryUsage.getMaximum() * 100);
    if (percentValue <= 80) {
      state = "ok";
    } else if (percentValue > 95) {
View Full Code Here

  }

  public boolean getUpdateMemory() {
    MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
    MemoryUsage memory = memoryBean.getHeapMemoryUsage();
    memoryUsage = new DefaultBoundedRangeModel(Long.valueOf(memory.getUsed()/1024).intValue(),
        0, 0, Long.valueOf(memory.getMax()/1024).intValue());
    int percentValue = memoryUsage.getValue()/(memoryUsage.getMaximum()*100);
    if (percentValue <= 80) {
      state = "ok";
    } else if (percentValue > 95) {
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);
    }

    final int diff = model.getMaximum() - model.getMinimum();
    Object title = progress.getAttributes().get(Attributes.TIP);
    if (title == null && diff > 0) {
View Full Code Here

public class getValueIsAdjusting
  implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultBoundedRangeModel dbrm;

    // Check #1.
    dbrm = new DefaultBoundedRangeModel();
    harness.check(dbrm.getValueIsAdjusting() == false);

    // Check #2.
    dbrm.setRangeProperties(3, 2, -4, 10, true);
    harness.check(dbrm.getValueIsAdjusting() == true);
  }
View Full Code Here

public class setValue
  implements Testlet
{
  public void test(TestHarness harness)
  {
    DefaultBoundedRangeModel dbrm = new DefaultBoundedRangeModel();

    // Check #1: Value between min and max.
    dbrm.setRangeProperties(1, 1, 0, 10, false);
    dbrm.setValue(5);
    setRangeProperties.check(harness, dbrm, 5, 1, 0, 10, false);

    // Check #2: Value < min.
    dbrm.setRangeProperties(4, 1, 3, 10, false);
    dbrm.setValue(-5);
    setRangeProperties.check(harness, dbrm, 3, 1, 3, 10, false);

    // Check #3: Value > max.
    dbrm.setRangeProperties(4, 0, 3, 10, false);
    dbrm.setValue(140);
    setRangeProperties.check(harness, dbrm, 10, 0, 3, 10, false);

    // Check #4: Value + extent > max.
    dbrm.setRangeProperties(4, 4, 3, 10, false);
    dbrm.setValue(9);
    setRangeProperties.check(harness, dbrm, 6, 4, 3, 10, false);
  }
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.