Package com.eagerlogic.cubee.client.components

Examples of com.eagerlogic.cubee.client.components.HBox


    public AttributePanelItem(AAttribute<?> attribute) {
        this.attribute = attribute;
        this.heightProperty().set(25);
       
        HBox root = new HBox();
        this.getChildren().add(root);
       
        pnlName = new Panel();
        pnlName.widthProperty().bind(new AExpression<Integer>() {
           
            {
                bind(clientWidthProperty());
            }

            @Override
            public Integer calculate() {
                return (clientWidthProperty().get() - 10) / 2;
            }
        });
        pnlName.heightProperty().bind(heightProperty());
        root.getChildren().add(pnlName);
       
        // TODO make styleable
        Label lblName = new Label();
        lblName.textProperty().set(attribute.getName());
        lblName.widthProperty().bind(pnlName.clientWidthProperty());
        lblName.maxWidthProperty().bind(pnlName.clientWidthProperty());
        lblName.translateYProperty().bind(new AlignMiddleExp(pnlName, lblName));
        lblName.textOverflowProperty().set(ETextOverflow.ELLIPSIS);
        pnlName.getChildren().add(lblName);
       
        root.addEmptyCell(10);
       
        pnlValue = new Panel();
        pnlValue.widthProperty().bind(pnlName.widthProperty());
        pnlValue.heightProperty().bind(heightProperty());
        if (!attribute.isReadonly()) {
            pnlValue.cursorProperty().set(ECursor.POINTER);
            pnlValue.onClickEvent().addListener(new IEventListener<ClickEventArgs>() {

                @Override
                public void onFired(ClickEventArgs args) {
                    showEditor();
                }
            });
        }
        root.getChildren().add(pnlValue);
       
        showValue();
       
       
    }
View Full Code Here


        this.valueConverter = valueConverter;
        Panel rootPanel = new Panel();
        rootPanel.cursorProperty().set(ECursor.POINTER);
        this.setRootComponent(rootPanel);
       
        root = new HBox();
        root.pointerTransparentProperty().set(true);
        rootPanel.getChildren().add(root);
        this.onChildrenChangedEvent().addListener(onChildrenChangedEventListener);
       
        rootPanel.onClickEvent().addListener(new IEventListener<ClickEventArgs>() {
View Full Code Here

TOP

Related Classes of com.eagerlogic.cubee.client.components.HBox

Copyright © 2018 www.massapicom. 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.