Package org.jdesktop.wonderland.common.cell.state

Examples of org.jdesktop.wonderland.common.cell.state.InteractionComponentServerState


    }

    @Override
    public CellComponentServerState getServerState(CellComponentServerState state) {
        if (state == null) {
            state = new InteractionComponentServerState();
        }

        ((InteractionComponentServerState) state).setCollidable(collidable);
        ((InteractionComponentServerState) state).setSelectable(selectable);
View Full Code Here


            originalCellName = cellServerState.getName();
            cellNameTextField.setText(originalCellName);
            cellIDLabel.setText(cell.getCellID().toString());
            cellClassLabel.setText(cell.getClass().getName());

            InteractionComponentServerState icss = (InteractionComponentServerState)
                    cellServerState.getComponentServerState(InteractionComponentServerState.class);
            if (icss == null) {
                origCollidable = true;
                origSelectable = true;
            } else {
                origCollidable = icss.isCollidable();
                origSelectable = icss.isSelectable();
            }
           
            collidableCB.setSelected(origCollidable);
            selectableCB.setSelected(origSelectable);
           
View Full Code Here

   
    private void saveInteractionComponent(CellServerState cellServerState) {
        boolean collidable = collidableCB.isSelected();
        boolean selectable = selectableCB.isSelected();
       
        InteractionComponentServerState icss = (InteractionComponentServerState)
                cellServerState.getComponentServerState(InteractionComponentServerState.class);
               
        if (icss == null && collidable && selectable) {
            // if both collidable and selectable are the default, we don't
            // need to add the component
        } else if (icss == null) {
            // we need to add the component
            icss = new InteractionComponentServerState();
            icss.setCollidable(collidable);
            icss.setSelectable(selectable);
            addInteractionComponent(icss);
        } else {
            // update the interaction component
            icss.setCollidable(collidable);
            icss.setSelectable(selectable);
            editor.addToUpdateList(icss);
        }
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.cell.state.InteractionComponentServerState

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.