Examples of NewInteractionComponentServerState


Examples of org.jdesktop.wonderland.modules.celleditor.common.NewInteractionComponentServerState

    }

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

        ((NewInteractionComponentServerState) state).setHighlightEnable(highlightEnable);
        ((NewInteractionComponentServerState) state).setRed(red);
        ((NewInteractionComponentServerState) state).setGreen(green);
View Full Code Here

Examples of org.jdesktop.wonderland.modules.celleditor.common.NewInteractionComponentServerState

            }
           
            collidableCB.setSelected(origCollidable);
            selectableCB.setSelected(origSelectable);
           
            NewInteractionComponentServerState hcss = (NewInteractionComponentServerState) cellServerState
                    .getComponentServerState(NewInteractionComponentServerState.class);
           
            if(hcss != null) {
                origHighlightColor = new Color(hcss.getRed(), hcss.getGreen(), hcss.getBlue());
                origHighlightEnable = hcss.isHighlightEnable();
                origCursorEnable = hcss.isCursorEnable();
                origStadardCursor = hcss.isStandardCursor();
                origCursorFilePath = hcss.getCursorFilePath();
            } else {
                origHighlightColor = Color.yellow;
                origHighlightEnable = false;
                origCursorEnable = false;
                origStadardCursor = true;
View Full Code Here

Examples of org.jdesktop.wonderland.modules.celleditor.common.NewInteractionComponentServerState

        boolean highlightEnable = highlightCB.isSelected();
        Color highlightColor = colorChipPanle.getBackground();
        boolean cursorEnable = cursorCB.isSelected();
        boolean isStandardCursor = rbStandardCursor.isSelected();
       
        NewInteractionComponentServerState newIC = (NewInteractionComponentServerState) cellServerState
                .getComponentServerState(NewInteractionComponentServerState.class);
       
        if(newIC == null && (!highlightEnable) && (!cursorEnable)) {
            // if both both are the default, we don't
            // need to add the component
        } else if(newIC == null) {
            // we need to add the component
            newIC = new NewInteractionComponentServerState();
           
            newIC.setHighlightEnable(highlightEnable);
            newIC.setCursorEnable(cursorEnable);
            if(highlightEnable) {
                float[] comps = highlightColor.getComponents(null);
                newIC.setRed(comps[0]);
                newIC.setGreen(comps[1]);
                newIC.setBlue(comps[2]);
            }
            if(cursorEnable) {
                newIC.setStandardCursor(isStandardCursor);
                String path = "";
                if(isStandardCursor) {
                    List l = (List) cbStandardCursor.getSelectedItem();
                    String sel_url = (String) l.get(0);
                    path = sel_url;
                } else {
                    path = uploadCursorFile(cursorFile);
                }
                newIC.setCursorFilePath(path);
            }
            addNewInteractionComponent(newIC);
        } else {
            // update the highlight component
            newIC.setHighlightEnable(highlightEnable);
            newIC.setCursorEnable(cursorEnable);
            if(highlightEnable) {
                float[] comps = highlightColor.getComponents(null);
                newIC.setRed(comps[0]);
                newIC.setGreen(comps[1]);
                newIC.setBlue(comps[2]);
            }
            if(cursorEnable) {
                newIC.setStandardCursor(isStandardCursor);
                String path = origCursorFilePath;
                if(isStandardCursor) {
                    List l = (List) cbStandardCursor.getSelectedItem();
                    String sel_url = (String) l.get(0);
                    path = sel_url;
                } else {
                    if(cursorFile!=null) {
                        path = uploadCursorFile(cursorFile);
                    }
                }
                newIC.setCursorFilePath(path);
            }
            editor.addToUpdateList(newIC);
        }
    }
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.