Package org.lazan.t5.stitch.demo.pages

Examples of org.lazan.t5.stitch.demo.pages.GridDecoratorDemo$Item


   *
   * @param taskId The id of the task submitted by a previous call to add(ProgressTask)
   * @return The progress value
   */
  public float getProgress(int taskId) {
    ProgressTask progressTask = executingTasks.get(taskId);
    return progressTask == null ? 1f : progressTask.getProgress();
  }
View Full Code Here


  }

  public Syntax getSyntax(Asset source) {
    String name = source.getResource().getFile();
    int dotIndex = name.lastIndexOf('.');
    Syntax syntax = null;
    if (dotIndex != -1) {
      String suffix = name.substring(dotIndex + 1);
      syntax = syntaxBySuffix.get(suffix);
    }
    return syntax == null ? Syntax.AUTO_DETECT : syntax;
View Full Code Here

  @Property
  private String currentName;

  void setup() {
    tabModels = new LinkedHashMap<String, TabModel>();
    TabGroupModel tabGroupModel = new TabGroupModel() {
      public void addTab(String name, String label, Block body) {
        tabModels.put(name, new TabModel(name, label, body));
      }
    };
    request.setAttribute(ATTRIBUTE_MODEL, tabGroupModel);
View Full Code Here

  @Inject
  private ComponentResources resources;
 
  @BeforeRenderBody
  boolean beforeRenderBody(MarkupWriter writer) {
    TabGroupModel tabModel = (TabGroupModel) request.getAttribute(TabGroup.ATTRIBUTE_MODEL);
    if (tabModel == null) {
      throw new IllegalStateException("Tab must be nested inside a TabGroup");
    }
    tabModel.addTab(name, label, resources.getBody());
   
    // don't render the body, it will be rendered by the TabGroup
    return false;
  }
View Full Code Here

    for (int i = 0; i < fieldCount; ++ i) {
      String paramName = "observe" + i;
      contextValues.add(request.getParameter(paramName));
    }
    CaptureResultCallback<Object> callback = new CaptureResultCallback<Object>();
    EventContext eventContext = new StringEventContext(contextValues, valueEncoderSource);
    resources.triggerContextEvent(event, eventContext, callback);
    return callback.getResult();
  }
View Full Code Here

TOP

Related Classes of org.lazan.t5.stitch.demo.pages.GridDecoratorDemo$Item

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.