Example usage for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setupFadeScrollBars

List of usage examples for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setupFadeScrollBars

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.ui ScrollPane setupFadeScrollBars.

Prototype

public void setupFadeScrollBars(float fadeAlphaSeconds, float fadeDelaySeconds) 

Source Link

Usage

From source file:es.eucm.ead.mockup.core.view.ui.components.edition.ActionsTable.java

License:Open Source License

public ActionsTable(Skin s, final Panel parent, FlagPanel f) {
    super(s);//  w ww . j  a v  a 2 s  .  c  om

    fPanel = f;
    top = new Table(s);
    bot = new Table(s);
    this.skin = s;

    final String[] pos = { "Activo", "Inactivo" };

    top.defaults().pad(10);
    FlagButton flag = new FlagButton(skin, fPanel);

    top.add(new CheckBox("DAR", s));
    top.add(" a ");
    top.add(new TextButton("Elemento", skin));
    top.add(" cambia si ");
    top.add(flag.getFlag());
    top.add(new SelectBox(pos, skin));

    ScrollPane sp = new ScrollPane(top, skin);
    sp.setupFadeScrollBars(0f, 0f);
    sp.setScrollingDisabled(true, false);

    TextButton accept = new TextButton("Aceptar", skin);
    TextButton newAct = new TextButton("Nueva accin", skin);

    bot.row();
    bot.add(accept).expandX().left();
    bot.add(newAct).expandX().right();

    accept.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            event.cancel();
            AbstractScreen.mockupController.hide(parent);
        }
    });

    newAct.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            event.cancel();
            //add new action
        }
    });

    this.add(sp).expand().fill();
    this.row();
    this.add(bot).expandX().fill().bottom();

    top.debug();
    this.debug();

}

From source file:es.eucm.ead.mockup.core.view.ui.components.edition.FlagPanel.java

License:Open Source License

public FlagPanel(Skin skin) {
    super(skin);//from w w  w .  j  a v a2 s. c o m

    setHeight(600);
    setWidth(600);

    setVisible(false);
    setModal(false);
    setColor(Color.DARK_GRAY);

    Table top = new Table(skin);
    Table bot = new Table(skin);

    top.defaults().pad(20);

    top.add("Panel de flags, selecciona uno").expandX().fill().center().top();
    top.row();
    top.add(new TextButton("Flag1", skin)).expandX().fill();
    top.add(new TextButton("LuzSala1", skin)).expandX().fill();
    top.add(new TextButton("LuzSala2", skin)).expandX().fill();

    top.row();
    top.add(new TextButton("Flag2", skin)).expandX().fill();
    top.add(new TextButton("Puerta1", skin)).expandX().fill();

    ScrollPane sp = new ScrollPane(top, skin);
    sp.setupFadeScrollBars(0f, 0f);
    sp.setScrollingDisabled(true, false);

    TextButton accept = new TextButton("Aceptar", skin);
    TextButton newAct = new TextButton("Nuevo FLAG", skin);

    bot.row();
    bot.add(accept).expandX().fill().left();
    bot.add(newAct).expandX().fill().right();

    this.add(top).expandY();
    this.row();
    this.add(bot);
}

From source file:es.eucm.ead.mockup.core.view.ui.components.OptionsPanel.java

License:Open Source License

public OptionsPanel(Skin skin, String styleName) {
    super(skin, styleName);
    this.x = AbstractScreen.stagew * .64f;
    this.y = UIAssets.OPTIONS_BUTTON_WIDTH_HEIGHT;
    setBounds(AbstractScreen.stagew, y, (AbstractScreen.stagew - y) - x, AbstractScreen.stageh - y * 2);
    setVisible(false);/*from   ww w  .  jav  a 2  s  .co  m*/
    setModal(true);

    Label cbs1 = new Label("SKINS", skin);
    String skinStyle = "default-radio", line = "- - - - - - - - - - - - -";
    CheckBox cbs2 = new CheckBox("Skin predefinido", skin, skinStyle);
    cbs2.setChecked(true);
    CheckBox cbs3 = new CheckBox("Skin divertido", skin, skinStyle);
    CheckBox cbs4 = new CheckBox("Skin serio", skin, skinStyle);
    CheckBox cbs5 = new CheckBox("Skin profesional", skin, skinStyle);
    Label cbs6 = new Label(line, skin);
    Label cbs7 = new Label("IDIOMAS", skin);
    CheckBox cbs8 = new CheckBox("ES/Espaol", skin, skinStyle);
    cbs8.setChecked(true);
    CheckBox cbs9 = new CheckBox("EN/Ingls", skin, skinStyle);
    CheckBox cbs10 = new CheckBox("FR/Francs", skin, skinStyle);
    Label cbs11 = new Label(line, skin);
    CheckBox cbs12 = new CheckBox("Mostrar ltimos\nproyectos editados", skin, skinStyle);
    cbs12.setChecked(true);

    new ButtonGroup(cbs2, cbs3, cbs4, cbs5);
    new ButtonGroup(cbs8, cbs9, cbs10);

    Table t = new Table();
    t.padTop(DEFAULT_PAD_BOTTON_AND_TOP);
    t.padBottom(DEFAULT_PAD_BOTTON_AND_TOP);
    ScrollPane sp = new ScrollPane(t, skin);
    sp.setupFadeScrollBars(0f, 0f);
    sp.setScrollingDisabled(true, false);
    t.add(cbs1);
    t.row();
    t.add(cbs2).left();
    t.row();
    t.add(cbs3).left();
    t.row();
    t.add(cbs4).left();
    t.row();
    t.add(cbs5).left();
    t.row();
    t.add(cbs6);
    t.row();
    t.add(cbs7);
    t.row();
    t.add(cbs8).left();
    t.row();
    t.add(cbs9).left();
    t.row();
    t.add(cbs10).left();
    t.row();
    t.add(cbs11);
    t.row();
    t.add(cbs12).left();
    add(sp);
}