Ejemplo n.º 1
0
  @Override
  public GLElement createParameters(GLElement elem) {
    final SingleAxisElement axis = (SingleAxisElement) elem;

    GLButton b = new GLButton(EButtonMode.CHECKBOX);
    b.setSelected(axis.isInvertOrder());
    b.setCallback(
        new ISelectionCallback() {
          @Override
          public void onSelectionChanged(GLButton button, boolean selected) {
            axis.setInvertOrder(selected);
          }
        });
    b.setRenderer(GLRenderers.drawText("min->max", VAlign.CENTER, new GLPadding(1, 2, 1, 6)));
    b.setSelectedRenderer(
        GLRenderers.drawText("max->min", VAlign.CENTER, new GLPadding(1, 2, 1, 6)));
    b.setSize(100, -1);
    return b;
  }
 private static DoubleRankColumnModel col(
     Function<IRow, Entry[]> year, int col, String text, String color, String bgColor) {
   return new DoubleRankColumnModel(
       new ValueGetter(year, col),
       GLRenderers.drawText(text, VAlign.CENTER),
       new Color(color),
       new Color(bgColor),
       unbound(),
       DoubleInferrers.MEDIAN,
       NumberFormat.getIntegerInstance(Locale.ENGLISH));
 }
 public GroupDistributionRankColumnModel() {
   super(Color.GRAY, new Color(0.95f, .95f, .95f));
   setHeaderRenderer(GLRenderers.drawText("Distribution", VAlign.CENTER));
   setWidth(50);
 }
 public TemplateElement(TablePerspective tablePerspective) {
   super(tablePerspective);
   setRenderer(GLRenderers.fillImage(Resources.ICON));
 }