Examples of ContextId


Examples of org.apache.helix.api.id.ContextId

        i++;
      }
      testRebalancerInvoked = true;

      // set some basic context
      ContextId contextId = ContextId.from(idealState.getResourceId().stringify());
      _contextProvider.putContext(contextId, new BasicControllerContext(contextId));
      return resourceMapping;
    }
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

                                      final String pseudo,
                                      final AttributeMap attributes)
      throws NormalizationException, IOException
  {

    final ContextId ctxId = new ContextId
        (ContextId.SOURCE_NORMALIZER, NO_PARENT, nextId);
    nextId += 1;

    final LayoutContext layoutContext = new DefaultLayoutContext
        (ctxId, namespace, tag, pseudo, attributes);
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

  public static void main(String[] args)
  {
    LibLayoutBoot.getInstance().start();
    DefaultLayoutContext layoutContext =
            new DefaultLayoutContext
                    (new ContextId(0, 0,0), "Bah", "buh", null, new AttributeMap());
    layoutContext.getStyle().setValue(FontStyleKeys.FONT_FAMILY, new CSSConstant("helvetica"));
    final FontSpecification fontSpecification = layoutContext.getFontSpecification();
    fontSpecification.setFontFamily("Arial");
    fontSpecification.setFontSize(12);
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

  public void testMarginCreation()
  {
    DefaultElementContext elementContext = new DefaultElementContext(null);
    DefaultLayoutContext layoutContext = new DefaultLayoutContext
            (new ContextId(0, 0, 0), "Bah", "buh", null, new AttributeMap());

    RenderableTextFactory tr = new CollapseTest.MarginRenderableTextFactory(null);


    int[] text = new int[]{' ', ' ', ' ', ' ', ' ', ' '};
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

  public void testMarginCreation()
  {
    DefaultElementContext elementContext = new DefaultElementContext(null);
    DefaultLayoutContext layoutContext = new DefaultLayoutContext
            (new ContextId(0, 0, 0), "Bah", "buh", null, new AttributeMap());

    RenderableTextFactory tr = new MarginRenderableTextFactory(null);


    int[] text = new int[]{' ', 'A', ' ', ' ', 'B', ' '};
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

  public void testChunkCreation()
  {
    DefaultElementContext elementContext = new DefaultElementContext(null);
    DefaultLayoutContext layoutContext = new DefaultLayoutContext
            (new ContextId(0, 0, 0), "Bah", "buh", null, new AttributeMap());

    RenderableTextFactory tr = new MarginRenderableTextFactory(null);


    int[] text0 = new int[]{'A'};
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

        // Currently, we're in a table-body element, and expect rows to follow.
        // Stupid user gave us something else instead, so we have to autogenerate
        // a row and a cell..
        // Autogenerate the table-row ..
        final StyleResolver styleResolver = layoutProcess.getStyleResolver();
        final ContextId id = new ContextId(ContextId.SOURCE_DISPLAY_MODEL, -1, 0);
        final LayoutContext rowContext =
            styleResolver.createAnonymousContext(id, layoutContext);
        fc.addElement(MODEL_TABLE_ROW, FLAG_AUTOGENERATED | TYPE_TABLE_ROW, rowContext);
        contentGenerator.startedTableRow(rowContext);

        final LayoutContext cellContext =
            styleResolver.createAnonymousContext(id, rowContext);
        fc.addElement(MODEL_BLOCK_INSIDE, FLAG_AUTOGENERATED | TYPE_TABLE_CELL, cellContext);
        contentGenerator.startedTableCell(cellContext);
        addToBlockLevelBox(layoutContext);
        return;
      }
      case MODEL_TABLE_ROW:
      {
        final StyleResolver styleResolver = layoutProcess.getStyleResolver();
        final ContextId id = new ContextId(ContextId.SOURCE_DISPLAY_MODEL, -1, 0);

        final LayoutContext cellContext =
            styleResolver.createAnonymousContext(id, layoutContext);
        fc.addElement(MODEL_BLOCK_INSIDE, FLAG_AUTOGENERATED | TYPE_TABLE_CELL, cellContext);
        contentGenerator.startedTableCell(cellContext);
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

    final int currentDisplayModel = fc.getCurrentDisplayModel();
    if (currentDisplayModel != MODEL_TABLE)
    {
      // Autogenerate the table ..
      final StyleResolver styleResolver = layoutProcess.getStyleResolver();
      final ContextId id = new ContextId(ContextId.SOURCE_DISPLAY_MODEL, -1, 0);

      final LayoutContext tableContext =
          styleResolver.createAnonymousContext(id, context);
      fc.addElement(MODEL_TABLE, FLAG_AUTOGENERATED | TYPE_TABLE, tableContext);
      contentGenerator.startedTable(tableContext);
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

    final int currentDisplayModel = fc.getCurrentDisplayModel();
    if (currentDisplayModel != MODEL_TABLE)
    {
      // Autogenerate the table ..
      final StyleResolver styleResolver = layoutProcess.getStyleResolver();
      final ContextId id = new ContextId(ContextId.SOURCE_DISPLAY_MODEL, -1, 0);

      final LayoutContext tableContext =
          styleResolver.createAnonymousContext(id, context);
      fc.addElement(MODEL_TABLE, FLAG_AUTOGENERATED | TYPE_TABLE, tableContext);
      contentGenerator.startedTable(tableContext);
View Full Code Here

Examples of org.jfree.layouting.layouter.context.ContextId

    if (currentDisplayModel != MODEL_TABLE &&
        currentDisplayModel != MODEL_TABLE_COLGROUP)
    {
      // Autogenerate the table ..
      final StyleResolver styleResolver = layoutProcess.getStyleResolver();
      final ContextId id = new ContextId(ContextId.SOURCE_DISPLAY_MODEL, -1, 0);

      suspendNonBlockElements();
      final LayoutContext tableContext =
          styleResolver.createAnonymousContext(id, context);
      fc.addElement(MODEL_TABLE, FLAG_AUTOGENERATED | TYPE_TABLE, tableContext);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.