GithubHelp home page GithubHelp logo

resizablecsslayout's People

Contributors

pleku avatar taurus227 avatar

Watchers

 avatar  avatar

resizablecsslayout's Issues

Can't resize Grid

I can't make this add-on work...

This is my code snippet:

public class FlotaConductores extends CustomComponent implements ClickListener, SucceededListener, Receiver, ProgressListener, StartedListener, FailedListener {

...

private VerticalLayout bodyContentConductores;

private HorizontalLayout layoutBotonesConductores;
private Button botonCargarFicheroConductores;
private Button botonBorrarConductor;
private Button botonAnadirConductor;

private ResizableCssLayout gridWrapper;
private Grid gridConductores;

...

public FlotaConductores(UI pUi){
    this.ui = pUi;

    this.navigator = ui.getNavigator();

    // Encontramos el directorio base de la aplicación
    basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath();

}

public VerticalLayout buildLayoutConductores(){
    bodyContentConductores = new VerticalLayout();
    bodyContentConductores.setMargin(true);
    bodyContentConductores.setSpacing(true);

    Grid grid = buildGridConductores();

    gridWrapper = new ResizableCssLayout(grid);
    gridWrapper.setResizable(true);
    gridWrapper.setHeight("100%");
    gridWrapper.setWidth("100%");
    gridWrapper.setCaption("Resize from grid's edges");

    bodyContentConductores.addComponent(gridWrapper);
    bodyContentConductores.addComponent(buildLayoutBotonesConductores());
    bodyContentConductores.setWidth("100%");

    return bodyContentConductores;
}

private Grid buildGridConductores() {

    PtDaoService ptDao = new PtDaoService();
    ptDao.obtenerConductores();

    containerConductoresSistema = new BeanItemContainer<Conductor>(Conductor.class, Flota.getInstance().getConductoresList());

    gridConductores = new Grid(containerConductoresSistema);
    gridConductores.setSizeFull();
    gridConductores.setSelectionMode(SelectionMode.MULTI);
    gridConductores.setImmediate(true);
    gridConductores.setWidth(100, Unit.PERCENTAGE);
    gridConductores.setHeight(100, Unit.PERCENTAGE);
    gridConductores.setColumnOrder("nombre", "email", "telefono", "domicilio");
    gridConductores.removeColumn("domicilioCoord");

    // Filtro
    final GridCellFilter filter = new GridCellFilter(gridConductores);
    filter.setTextFilter("nombre", false, false);
    filter.setTextFilter("email", false, false);
    filter.setTextFilter("telefono", false, false);
    filter.setTextFilter("domicilio", false, false);

    return gridConductores;
}

...

}

What am I doing wrong?

Vaadin 8 Incompatible.

Hi,

While the code itself is compatible with Vaadin 8 there are some issues with the compiled code in release 1.1.0 when used with Vaadin 8.

If you extend ResizableCssLayoutState then you get a StackOverFlowError whenever you call getState(boolean) ... which is called indirectly in the constructor of ResizableCSSLayout.

Recompiling the addon against Vaadin 8 resolves this issue and allows you to extend ResizableCssLayout

This may be related to bridge methods created in the compiled class file for ResizableCssLayout. In Vaadin 7 CssLayout did not define a getState(boolean) method, so when ResizableCssLayout is compiled against the Vaadin 7 code base the compiled class file adds bridge methods because ResizableCssLayout overrides the return type of getState(boolean) casting the returned state to a ResizableCssLayoutState.

Support keeping aspect ratio

Should be possible to say to ResizableCssLayout to keep the current aspect ratio of the component on resize - the user's DND always changes both width & height.

Enable touch support

Enable touch support to make it possible to do resize with touch screen. At least android (chrome) and iOS (safari) should work, maybe even windows phone (IE).

Fix 1px offset error when resizing (v1.0.1)

When starting a resize with onMouseDown, the resize handle should always be in the same location, which is the current size. Holding the mouse down and then releasing it without moving should not resize the component.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.