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

Examples of org.jdesktop.wonderland.common.cell.component.state.CellPhysicsPropertiesComponentServerState


    public String getDisplayName() {
        return BUNDLE.getString("Physics_Properties_Component");
    }

    public <T extends CellComponentServerState> T getDefaultCellComponentServerState() {
        CellPhysicsPropertiesComponentServerState state =
                new CellPhysicsPropertiesComponentServerState();
        PhysicsProperties prop = state.getPhyiscsProperties(
                CellPhysicsPropertiesComponentServerState.DEFAULT_NAME);
        if (prop == null) {
            prop = new PhysicsProperties();
            state.addPhysicsProperties(
                    CellPhysicsPropertiesComponentServerState.DEFAULT_NAME,
                    prop);
        }
        prop.setMass(2f);
        return (T) state;
View Full Code Here


     */
    public <T extends CellServerState> void getCellServerState(
            T cellServerState) {
        // Figure out whether there already exists a server state for the
        // component.
        CellPhysicsPropertiesComponentServerState state =
                (CellPhysicsPropertiesComponentServerState) cellServerState.getComponentServerState(
                CellPhysicsPropertiesComponentServerState.class);
        if (state == null) {
            state = new CellPhysicsPropertiesComponentServerState();
        }

        PhysicsProperties p = state.getPhyiscsProperties(
                CellPhysicsPropertiesComponentServerState.DEFAULT_NAME);
        if (p == null) {
            p = new PhysicsProperties();
            state.addPhysicsProperties(
                    CellPhysicsPropertiesComponentServerState.DEFAULT_NAME, p);
        }

        p.setMass(((Float) massSpinner.getModel().getValue()).floatValue());
        cellServerState.addComponentServerState(state);
View Full Code Here

     *
     * @param state The state object, if null, creates one.
     * @return The current server state information
     */
    public CellComponentServerState getServerState(CellComponentServerState state) {
        CellPhysicsPropertiesComponentServerState ret = (CellPhysicsPropertiesComponentServerState) state;

        return physicsState.clone(ret);
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.wonderland.common.cell.component.state.CellPhysicsPropertiesComponentServerState

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.