java.lang.Object
de.grogra.pf.ui.PanelDecorator
de.grogra.imp.View
de.grogra.socketview.SocketView
- All Implemented Interfaces:
ViewConfig3D,Manageable,SharedObjectReference,XAListener,Context,Panel,Disposable,EventListener,ModifiableMap.Producer,EventListener,TreeModelListener
An "invisible" view that manage a websocket server thread. The view link
the ws server and the project graph.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.grogra.imp.View
View.SceneListenerNested classes/interfaces inherited from interface de.grogra.util.EventListener
EventListener.Bicast, EventListener.MulticasterNested classes/interfaces inherited from interface de.grogra.persistence.XAListener
XAListener.WeakDelegate -
Field Summary
FieldsFields inherited from class de.grogra.imp.View
ANAGLYPH_MAX, ANAGLYPH_VIEW_TYPE, COMPONENT, epsilon$FIELD, graphDescriptor$FIELD, I18N, listeners, LOD_MAX, LOD_MIN, LOD_TYPE, magnitude$FIELD, overlay, PREVIEW_MAX, SCALE_COUNT, SCALES_CHANGED, SCALES_VISIBLE, sel1x, sel1y, sel2x, sel2y, STEREO_MAX, STEREO_VIEW_TYPE, VIEW_PREVIEW1_TYPE, VIEW_PREVIEW2_TYPE, visibleLayers$FIELD, visibleScales$FIELD, visualEpsilon$FIELDFields inherited from class de.grogra.pf.ui.PanelDecorator
decorator, panelFields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcommit(org.json.JSONObject jo) voidIf the "transaction" is empty nothing is sendvoidprotected ViewEventHandlervoidderive()Update the data with the remove set.protected voidvoidgetDefaultLight(Matrix4d lightToWorld) Computes a default light to use when a scene contains no lights.org.json.JSONObjectReturn the current data in the view.org.json.JSONObjectReturn only the current diff (i.e. the nodes added/ removed since the last derivation)protected UIPropertyprotected UIPropertyinitialize(Panel panel, Map params) protected voidbooleanisIn(de.grogra.socketview.shapes.SocketShape node) booleanisToolGraph(Graph graph) voidnodesChanged(Map<Long, de.grogra.socketview.shapes.SocketShape> l) voidvoidvoidprocessRequest(String request, io.netty.channel.Channel ch) Process the request from the clients.voidremoveNodes(Map<Long, de.grogra.socketview.shapes.SocketShape> l) voidsharedObjectModified(Shareable object, Transaction t) voidvoidtransactionApplied(Transaction.Data xa, boolean rollback) Do not check the options at every computediff.protected voidprotected voidbooleanWait for the data to be readywrapRequest(StringMap sm, Executable c, io.netty.channel.Channel ch) Methods inherited from class de.grogra.imp.View
addEventListener, addMappings, addToolListener, create, disableRepaint, dispose, disposeRenderer, enableRepaint, eventOccured, fieldModified, get, get, getActiveTool, getEpsilon, getEpsilonSquared, getEventHandler, getGraph, getMagnitude, getMagnitudeSquared, getNodeInOverlayProjection, getOverlay, getPathFor, getSelectableGraph, getSelectableLayers, getSelectableScales, getSize, getStamp, getViewComponent, getViewComponent, getVisibleLayers, getVisibleScales, getVisualEpsilon, getVisualEpsilonSquared, getWorkbenchGraphState, isInVisibleLayer, isInVisibleScale, isRepaint, manageableReadResolve, manageableWriteReplace, nextTool, removeEventListener, render, renderToFile, repaint, repaintOverlay, set, setActiveTool, setDimensions, setDimensions, setEpsilon, setGraph, setGraph, setMagnitude, setViewComponent, setVisibleLayers, setVisualEpsilon, substituteSelection, treeNodesChanged, treeNodesInserted, treeNodesRemoved, treeStructureChanged, uninstall, zoomInOverlayMethods inherited from class de.grogra.pf.ui.PanelDecorator
checkClose, getComponent, getContent, getDecorator, getMenu, getPanel, getPanelId, getUIPropertyMap, getWindow, getWorkbench, initDecorator, initPanel, resolve, setContent, setCursor, setMenu, showMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.grogra.imp3d.ViewConfig3D
getEpsilon, getGraph, getWorkbench, isInVisibleLayer, isInVisibleScale
-
Field Details
-
TOOL
-
isVisiting
public boolean isVisiting -
$TYPE
-
-
Constructor Details
-
SocketView
public SocketView()
-
-
Method Details
-
startVisiting
public void startVisiting() -
finishVisiting
public void finishVisiting() -
isIn
public boolean isIn(de.grogra.socketview.shapes.SocketShape node) -
getJsonData
public org.json.JSONObject getJsonData()Return the current data in the view. If the data is empty -> sync with the graph- Returns:
-
getJsonDataDiff
public org.json.JSONObject getJsonDataDiff()Return only the current diff (i.e. the nodes added/ removed since the last derivation) -
waitRenderer
public boolean waitRenderer()Wait for the data to be ready -
derive
public void derive()Update the data with the remove set. TODO: also make the addition processed here -
getSocketTransaction
-
addNodes
-
removeNodes
-
nodesChanged
-
commit
public void commit(org.json.JSONObject jo) -
commitDataDiff
public void commitDataDiff()If the "transaction" is empty nothing is send -
commitSelection
public void commitSelection() -
initialize
- Specified by:
initializein interfacePanel- Overrides:
initializein classView
-
disposeViewComponent
protected void disposeViewComponent()- Overrides:
disposeViewComponentin classView
-
installImpl
protected void installImpl()- Specified by:
installImplin classView
-
uninstallImpl
protected void uninstallImpl()- Specified by:
uninstallImplin classView
-
processRequest
Process the request from the clients. A request is a registry path to an executable and a URL decoded map of parameters (?key1=value1invalid input: '&key2'=value2). If the executable is a ObjectMethod, the return value of this method is forwarded, otherwise only true is returned if the execution was done. If the path to the executable does not start with an "/" it's assumed the path starts at "/ui/socketTools/".- Parameters:
request- URL string with executable path and parameterswb-
-
wrapRequest
-
getToolProperty
- Specified by:
getToolPropertyin classView
-
createEventHandler
- Specified by:
createEventHandlerin classView
-
transactionApplied
Do not check the options at every computediff. Only at option changed.- Specified by:
transactionAppliedin interfaceXAListener
-
updateOptions
protected void updateOptions() -
getViewEventFactoryProperty
- Specified by:
getViewEventFactoryPropertyin classView
-
getResolutionProperty
- Specified by:
getResolutionPropertyin classView
-
getFlavor
-
pick
-
pickTool
-
isToolGraph
- Specified by:
isToolGraphin classView
-
getCamera
- Specified by:
getCamerain interfaceViewConfig3D
-
getDefaultLight
Description copied from interface:ViewConfig3DComputes a default light to use when a scene contains no lights.- Specified by:
getDefaultLightin interfaceViewConfig3D- Parameters:
lightToWorld- the computed transformation for the light is placed in here- Returns:
- a default light
-
getManageableType
- Specified by:
getManageableTypein interfaceManageable
-