Package org.odlabs.wiquery.ui.position

Examples of org.odlabs.wiquery.ui.position.PositionOptions


    if (position instanceof PositionOptions)
    {
      return (PositionOptions) position;
    }
   
    return new PositionOptions()
        .setMy(new PositionAlignmentOptions(PositionRelation.CENTER))
        .setAt(new PositionAlignmentOptions(PositionRelation.CENTER))
        .setOf("window");
  }
View Full Code Here


    if (position != null && position instanceof PositionOptions)
    {
      return (PositionOptions) position;
    }

    PositionOptions pos = new PositionOptions()
        .setMy(new PositionAlignmentOptions(PositionRelation.LEFT, PositionRelation.TOP))
        .setAt(new PositionAlignmentOptions(PositionRelation.LEFT, PositionRelation.BOTTOM))
        .setCollision(PositionCollision.NONE);
    return pos;
  }
View Full Code Here

    add(dialogContainer);
   
    final Dialog dialog = new Dialog("dialog");
    dialog.setResizable(true);
    dialog.setTitle("Dialog title");
    dialog.setPosition(new PositionOptions()
        .setAt(new PositionAlignmentOptions(PositionRelation.TOP))
        .setMy(new PositionAlignmentOptions(PositionRelation.TOP))
        .setOf("#" + dialogContainer.getMarkupId())
    );
    dialog.setShow(new DialogAnimateOption("fold"));
View Full Code Here

  @Test
  public void testGetPosition()
  {
    assertEquals(dialog.getPosition().getJavascriptOption().toString(),
        "{my: 'center', at: 'center', of: 'window'}");
    dialog.setPosition(new PositionOptions()
        .setMy(new PositionAlignmentOptions(PositionRelation.RIGHT))
        .setAt(new PositionAlignmentOptions(PositionRelation.CENTER, 10, PositionRelation.BOTTOM, -10))
        .setOf("#someId")
    );
    assertEquals(dialog.getPosition().getJavascriptOption().toString(),
View Full Code Here

  public void testGetPosition()
  {
    assertNotNull(autocomplete.getPosition());
    assertEquals(autocomplete.getPosition().getJavascriptOption().toString(),
      "{my: 'left top', at: 'left bottom', collision: 'none'}");
    PositionOptions position = new PositionOptions();
    position.setCollision(PositionCollision.FIT);
    autocomplete.setPosition(position);
    assertNotNull(autocomplete.getPosition());
    assertEquals(autocomplete.getPosition().getJavascriptOption().toString(),
      "{collision: 'fit'}");
  }
View Full Code Here

   
    if(obj instanceof PositionOptions){
      return (PositionOptions) obj;
    }
   
    PositionOptions pos = new PositionOptions();
    pos.setMy(Position.LEFT_TOP);
    pos.setAt(Position.RIGHT_TOP);
   
    return pos;
  }
View Full Code Here

   
    if(obj instanceof PositionOptions){
      return (PositionOptions) obj;
    }
   
    return new PositionOptions();
  }
View Full Code Here

   
    if(obj instanceof PositionOptions){
      return (PositionOptions) obj;
    }
   
    PositionOptions pos = new PositionOptions();
    pos.setMy(Position.LEFT_TOP);
    pos.setAt(Position.LEFT_BOTTOM);
   
    return pos;
  }
View Full Code Here

TOP

Related Classes of org.odlabs.wiquery.ui.position.PositionOptions

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.