Examples of ColumnLayout


Examples of org.gwtlib.client.table.ColumnLayout

          check, label.toString(), date, number, date, number, "One", number.toString(),
          number.toString(), "Hyperlink", "img/down.gif"
      });
    }
    // Now configure the table
    ColumnLayout layout = new ColumnLayout(columns);
    final PagingTable table = new PagingTable(layout, new PagingBar(0, TOTAL_SIZE, 10, new int[] { 5, 10, 20, 50, 100 }));
    ContentProvider provider = new ContentProvider() {
      // Simulate retrieval of sample data, in requested sort order
      public void load(int begin, int end, final int sortId, boolean ascending) {
        final int sign = ascending ? 1 : -1;
View Full Code Here

Examples of org.gwtlib.client.table.ColumnLayout

    Column[] columns = {
      new Column(0, false, "First Name", "50%"),
      new Column(1, false, "Last Name", "50%")
    };
    Table table = new Table(new ColumnLayout(columns));
    table.setSize("100%", "100%");
    table.setContentProvider(new PersonContentProvider(table));
    table.update();
    root.add(table);
  }
View Full Code Here

Examples of org.kiji.schema.layout.KijiTableLayout.LocalityGroupLayout.FamilyLayout.ColumnLayout

  public void testAddColumn() throws Exception {
    final KijiTableLayout layout1 = KijiTableLayout.newLayout(getLayoutV1Desc());
    {
      final FamilyLayout fLayout1 = layout1.getFamilyMap().get("family_name");
      assertEquals(1, fLayout1.getId().getId());
      final ColumnLayout c1Layout1 = fLayout1.getColumnMap().get("column_name");
      assertEquals(1, c1Layout1.getId().getId());
    }

    final KijiTableLayout layout2 = KijiTableLayout.createUpdatedLayout(getLayoutV2Desc(), layout1);
    {
      final FamilyLayout fLayout2 = layout2.getFamilyMap().get("family_name");
      assertEquals(1, fLayout2.getId().getId());
      final ColumnLayout c1Layout2 = fLayout2.getColumnMap().get("column_name");
      assertEquals(1, c1Layout2.getId().getId());
      final ColumnLayout c2Layout2 = fLayout2.getColumnMap().get("second_column_name");
      assertEquals(2, c2Layout2.getId().getId());
    }

    final KijiTableLayout layout3 = KijiTableLayout.createUpdatedLayout(getLayoutV3Desc(), layout2);
    {
      final FamilyLayout fLayout3 = layout3.getFamilyMap().get("family_name");
      assertEquals(1, fLayout3.getId().getId());
      assertEquals(1, fLayout3.getColumnMap().size());
      final ColumnLayout c2Layout3 = fLayout3.getColumnMap().get("second_column_name");
      assertEquals(2, c2Layout3.getId().getId());
    }

    final KijiTableLayout layout4 = KijiTableLayout.createUpdatedLayout(getLayoutV4Desc(), layout3);
    {
      final FamilyLayout fLayout4 = layout4.getFamilyMap().get("family_name");
      assertEquals(1, fLayout4.getId().getId());
      assertEquals(2, fLayout4.getColumnMap().size());
      final ColumnLayout c2Layout4 = fLayout4.getColumnMap().get("second_column_name");
      assertEquals(2, c2Layout4.getId().getId());
      final ColumnLayout c3Layout4 = fLayout4.getColumnMap().get("third_column_name");
      assertEquals(1, c3Layout4.getId().getId());
    }
  }
View Full Code Here

Examples of org.terasology.rendering.nui.layouts.ColumnLayout


    @Override
    public void initialise() {

        ColumnLayout mainLayout = new ColumnLayout();
        mainLayout.setHorizontalSpacing(8);
        mainLayout.setVerticalSpacing(8);
        mainLayout.setFamily("option-grid");
        UISlider mouseSensitivity = new UISlider("mouseSensitivity");
        mouseSensitivity.setIncrement(0.025f);
        mouseSensitivity.setPrecision(3);

        mainLayout.addWidget(new UILabel("mouseLabel", "heading-input", "Mouse"));
        mainLayout.addWidget(new RowLayout(new UILabel("Mouse Sensitivity:"), mouseSensitivity).setColumnRatios(0.4f).setHorizontalSpacing(horizontalSpacing));
        mainLayout.addWidget(new RowLayout(new UILabel("Invert Mouse:"), new UICheckbox("mouseYAxisInverted")).setColumnRatios(0.4f).setHorizontalSpacing(horizontalSpacing));

        Map<String, InputCategory> inputCategories = Maps.newHashMap();
        Map<SimpleUri, RegisterBindButton> inputsById = Maps.newHashMap();
        DependencyResolver resolver = new DependencyResolver(moduleManager.getRegistry());
        for (Name moduleId : moduleManager.getRegistry().getModuleIds()) {
            Module module = moduleManager.getRegistry().getLatestModuleVersion(moduleId);
            if (module.isCodeModule()) {
                ResolutionResult result = resolver.resolve(moduleId);
                if (result.isSuccess()) {
                    try (ModuleEnvironment environment = moduleManager.loadEnvironment(result.getModules(), false)) {
                        for (Class<?> holdingType : environment.getTypesAnnotatedWith(InputCategory.class, new FromModule(environment, moduleId))) {
                            InputCategory inputCategory = holdingType.getAnnotation(InputCategory.class);
                            inputCategories.put(module.getId() + ":" + inputCategory.id(), inputCategory);
                        }
                        for (Class<?> bindEvent : environment.getTypesAnnotatedWith(RegisterBindButton.class, new FromModule(environment, moduleId))) {
                            if (BindButtonEvent.class.isAssignableFrom(bindEvent)) {
                                RegisterBindButton bindRegister = bindEvent.getAnnotation(RegisterBindButton.class);
                                inputsById.put(new SimpleUri(module.getId(), bindRegister.id()), bindRegister);
                            }
                        }
                    }
                }

            }
        }

        addInputSection(inputCategories.remove("engine:movement"), mainLayout, inputsById);
        addInputSection(inputCategories.remove("engine:interaction"), mainLayout, inputsById);
        addInputSection(inputCategories.remove("engine:inventory"), mainLayout, inputsById);
        addInputSection(inputCategories.remove("engine:general"), mainLayout, inputsById);
        for (InputCategory category : inputCategories.values()) {
            addInputSection(category, mainLayout, inputsById);
        }
        mainLayout.addWidget(new UISpace(new Vector2i(1, 16)));

        ScrollableArea area = new ScrollableArea();
        area.setContent(mainLayout);
        //area.setContentHeight(mainLayout.getRowCount() * 32);

        ColumnLayout footerGrid = new ColumnLayout("footer");
        footerGrid.setFamily("menu-options");
        footerGrid.setColumns(2);
        footerGrid.addWidget(new UIButton("reset", "Restore Defaults"));
        footerGrid.addWidget(new UIButton("close", "Back"));
        footerGrid.setHorizontalSpacing(8);

        RelativeLayout layout = new RelativeLayout();
        layout.addWidget(new UIImage("title", Assets.getTexture("engine:terasology")),
                HorizontalHint.create().fixedWidth(512).center(),
                VerticalHint.create().fixedHeight(128).alignTop(48));
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.