Examples of PlacemarkComponentServerState


Examples of org.jdesktop.wonderland.modules.placemarks.common.PlacemarkComponentServerState

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

    public <T extends CellComponentServerState> T getDefaultCellComponentServerState() {
        PlacemarkComponentServerState state = new PlacemarkComponentServerState();
        return (T) state;
    }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.placemarks.common.PlacemarkComponentServerState

    /**
     * @inheritDoc()
     */
    public void open() {
        CellServerState cellServerState = editor.getCellServerState();
        PlacemarkComponentServerState state =
                (PlacemarkComponentServerState) cellServerState.getComponentServerState(
                PlacemarkComponentServerState.class);
        if (state != null) {
            origName = state.getPlacemarkName();
            origRotation = state.getPlacemarkRotation();
            origMessage = state.getMessage();
            origImageURL = state.getImageURL();
            origBackColor = state.getBackgroundColor();
            origTextColor = state.getTextColor();
           
            if(origImageURL==null) {
                origImageURL="";
            }
            if(origMessage==null) {
View Full Code Here

Examples of org.jdesktop.wonderland.modules.placemarks.common.PlacemarkComponentServerState

     */
    public void apply() {
        // Figure out whether there already exists a server state for the
        // component.
        CellServerState cellServerState = editor.getCellServerState();
        PlacemarkComponentServerState state =
                (PlacemarkComponentServerState) cellServerState.getComponentServerState(
                PlacemarkComponentServerState.class);
        if (state == null) {
            state = new PlacemarkComponentServerState();
        }

        String name = nameTF.getText().trim();
        String rotation = rotationTF.getText().trim();

        if (name.length() == 0) {
            name = null;
        }

        if (rotation.length() == 0) {
            rotation = null;
        }

        File image = cspp.getImage();
        String uri=cspp.getImageURL();
        if(image!=null) {
             uri = uploadImage(image);
        }
       
        state.setPlacemarkName(name);
        state.setPlacemarkRotation(rotation);

        state.setMessage(cspp.getMessage());
        state.setImageURL(uri);
        state.setBackgroundColor(cspp.getBackColor());
        state.setTextColor(cspp.getTextColor());
        editor.addToUpdateList(state);
    }
View Full Code Here

Examples of org.jdesktop.wonderland.modules.placemarks.common.PlacemarkComponentServerState

    }

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

        ((PlacemarkComponentServerState)state).setPlacemarkName(placemarkName);
        ((PlacemarkComponentServerState)state).setPlacemarkRotation(placemarkRotation);
        ((PlacemarkComponentServerState)state).setBackgroundColor(backgroundColor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.