|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisad.ActionImpl
visad.DisplayImpl
public abstract class DisplayImpl
DisplayImpl is the abstract VisAD superclass for display implementations. It is runnable.
DisplayImpl is not Serializable and should not be copied between JVMs.
Nested Class Summary | |
---|---|
class |
DisplayImpl.Syncher
|
Field Summary |
---|
Constructor Summary | |
---|---|
DisplayImpl(RemoteDisplay rmtDpy,
DisplayRenderer renderer)
construct DisplayImpl from RemoteDisplay |
|
DisplayImpl(RemoteDisplay rmtDpy,
DisplayRenderer renderer,
boolean cl)
|
|
DisplayImpl(java.lang.String name,
DisplayRenderer renderer)
constructor with non-default DisplayRenderer |
Method Summary | |
---|---|
void |
addActivityHandler(ActivityHandler ah)
Add a busy/idle activity handler. |
void |
addControl(Control control)
|
void |
addDataSourceListener(RemoteSourceListener listener)
Deprecated. |
void |
addDisplayListener(DisplayListener listener)
add a DisplayListener |
void |
addMap(ScalarMap map)
add a ScalarMap to this Display; can only be invoked when no DataReference-s are linked to this Display |
void |
addMap(ScalarMap map,
int remoteId)
|
void |
addMessageListener(MessageListener listener)
Forward messages to the specified listener |
void |
addReference(DataReference ref,
ConstantMap[] constant_maps)
Link a reference to this Display. |
void |
addReference(ThingReference ref)
Link a reference to this Display. |
void |
addReferences(DataRenderer renderer,
DataReference ref)
Link a reference to this Display using a non-default renderer. |
void |
addReferences(DataRenderer renderer,
DataReference[] refs)
Link references to this display using a non-default renderer. |
void |
addReferences(DataRenderer renderer,
DataReference[] refs,
ConstantMap[][] constant_maps)
Link references to this display using the non-default renderer. |
void |
addReferences(DataRenderer renderer,
DataReference ref,
ConstantMap[] constant_maps)
Link a reference to this Display using a non-default renderer. |
void |
addRemoteSourceListener(RemoteSourceListener listener)
Inform listener of changes in the availability of remote data/collaboration sources. |
void |
addRendererSourceListener(RendererSourceListener listener)
Inform listener of deleted DataRenderer s. |
void |
addSlave(RemoteSlaveDisplay display)
links a slave display to this display |
boolean |
checkTicks()
DisplayImpl always runs doAction to find out if there is work to do |
void |
clearMaps()
clear set of ScalarMap-s associated with this display; can only be invoked when no DataReference-s are linked to this Display |
void |
connectionFailed(DataRenderer renderer,
DataDisplayLink link)
Notify this Display that a connection to a remote server has failed |
void |
controlChanged()
used by Control-s to notify this DisplayImpl that they have changed |
static void |
delay(int millis)
Deprecated. Use new visad.util.Delay(millis) instead. |
void |
destroy()
destroy this display |
void |
disableEvent(int id)
Disables reporting of a DisplayEvent of a given type when it occurs in this display. |
void |
doAction()
a Display is runnable; doAction is invoked by any event that requires a re-transform |
void |
enableEvent(int id)
Enables reporting of a DisplayEvent of a given type when it occurs in this display. |
boolean |
equals(java.lang.Object obj)
given their complexity, its reasonable that DisplayImpl objects are only equal to themselves |
int |
getAPI()
|
java.awt.Component |
getComponent()
return the java.awt.Component (e.g., JPanel or AppletPanel) this DisplayImpl uses; returns null for an offscreen DisplayImpl |
int |
getConnectionID(RemoteDisplay rmtDpy)
Return the ID used to identify the collaborative connection to the specified remote display. WARNING! Due to limitations in the Java RMI implementation, this only works with an exact copy of the RemoteDisplay used to create the collaboration link. |
java.util.Vector |
getConstantMapVector()
|
Control |
getControl(java.lang.Class c)
only called for Control objects associated with 'single' DisplayRealType-s |
Control |
getControl(java.lang.Class c,
int inst)
find specified occurance for Control object of the specified class |
java.util.Vector |
getControls(java.lang.Class c)
find all Control objects of the specified class |
java.util.Vector |
getControlVector()
Deprecated. - DisplayImpl shouldn't expose itself at this level. |
protected abstract DisplayRenderer |
getDefaultDisplayRenderer()
return the default DisplayRenderer for this DisplayImpl |
DisplayMonitor |
getDisplayMonitor()
Returns the DisplayMonitor associated with this
Display . |
DisplayRenderer |
getDisplayRenderer()
return the DisplayRenderer associated with this DisplayImpl |
DisplayRealType |
getDisplayScalar(int index)
|
int |
getDisplayScalarCount()
|
int |
getDisplayScalarIndex(DisplayRealType dreal)
|
DisplaySync |
getDisplaySync()
Returns the DisplaySync associated with this
Display . |
abstract GraphicsModeControl |
getGraphicsModeControl()
return the GraphicsModeControl associated with this DisplayImpl |
java.awt.image.BufferedImage |
getImage()
return a captured image of the display |
java.awt.image.BufferedImage |
getImage(boolean sync)
return a captured image of the display; synchronize if sync |
java.util.Vector |
getMapVector()
return a Vector of the ScalarMap-s associated with this Display |
MouseBehavior |
getMouseBehavior()
|
int |
getNumberOfControls()
return the total number of controls used by this display |
java.awt.print.Printable |
getPrintable()
Return the Printable object to be used by a PrinterJob. |
abstract ProjectionControl |
getProjectionControl()
return the ProjectionControl associated with this DisplayImpl |
java.util.Vector |
getRenderers()
Returns the list of DataRenderer-s. |
java.util.Vector |
getRendererVector()
Returns a clone of the list of DataRenderer-s. |
ScalarType |
getScalar(int index)
|
int |
getScalarCount()
|
int |
getScalarIndex(ScalarType real)
|
int |
getValueArrayLength()
|
int[] |
getValueToMap()
|
int[] |
getValueToScalar()
|
java.awt.Container |
getWidgetPanel()
get a GUI component containing this Display's Control widgets, creating the widgets as necessary |
boolean |
hasSlaves()
whether there are any slave displays linked to this display |
boolean |
isEventEnabled(int id)
Gets whether a DisplayEvent of a given type is reported when it occurs in this display. |
void |
lostCollabConnection(int id)
Inform RemoteSourceListener s that the specified collaborative
connection has been lost.WARNING! This should only be called from within the visad.collab package! |
double[] |
make_matrix(double rotx,
double roty,
double rotz,
double scale,
double transx,
double transy,
double transz)
|
double[] |
multiply_matrix(double[] a,
double[] b)
|
void |
notifyListeners(DisplayEvent evt)
Notify this instance's DisplayListener s. |
void |
notifyListeners(int id,
int x,
int y)
|
static void |
printStack(java.lang.String message)
print a stack dump |
void |
reAutoScale()
re-apply auto-scaling of ScalarMap ranges next time Display is triggered |
void |
reDisplayAll()
|
void |
removeActivityHandler(ActivityHandler ah)
Remove a busy/idle activity handler. |
void |
removeAllReferences()
remove all DataReference links |
void |
removeAllSlaves()
removes all links between slave displays and this display |
void |
removeDataSourceListener(RemoteSourceListener listener)
Deprecated. |
void |
removeDisplayListener(DisplayListener listener)
remove a DisplayListener |
void |
removeMessageListener(MessageListener listener)
Remove listener from the message list. |
void |
removeReference(ThingReference ref)
remove link to ref; must be local DataReferenceImpl; if ref was added as part of a DataReference array passed to addReferences, remove links to all of them |
void |
removeRemoteSourceListener(RemoteSourceListener listener)
Remove listener from the remote source notification list. |
void |
removeRendererSourceListener(RendererSourceListener listener)
Remove listener from the DataRenderer deletion list. |
void |
removeSlave(RemoteSlaveDisplay display)
removes a link between a slave display and this display |
void |
replaceReference(RemoteDisplay rDpy,
DataReference ref,
ConstantMap[] constant_maps)
Replace remote reference with local reference. |
void |
replaceReference(RemoteDisplay rDpy,
ThingReference ref)
Replace remote reference with local reference. |
void |
replaceReferences(RemoteDisplay rDpy,
DataRenderer renderer,
DataReference ref)
Replace remote reference with local reference using non-default renderer. |
void |
replaceReferences(RemoteDisplay rDpy,
DataRenderer renderer,
DataReference[] refs)
Replace remote references with local references. |
void |
replaceReferences(RemoteDisplay rDpy,
DataRenderer renderer,
DataReference[] refs,
ConstantMap[][] constant_maps)
Replace remote references with local references. |
void |
replaceReferences(RemoteDisplay rDpy,
DataRenderer renderer,
DataReference ref,
ConstantMap[] constant_maps)
Replace remote reference with local reference using non-default renderer. |
void |
sendMessage(MessageEvent msg)
Send a message to all MessageListeners. |
void |
setAlwaysAutoScale(boolean a)
if auto is true, re-apply auto-scaling of ScalarMap ranges every time Display is triggered |
void |
setComponent(java.awt.Component c)
|
void |
setMouseBehavior(MouseBehavior m)
|
protected void |
syncRemoteData(RemoteDisplay rmtDpy)
|
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.String pre)
|
void |
updateBusyStatus()
Indicate to activity monitor that the Display is busy. |
void |
updateSlaves(java.awt.image.BufferedImage img)
updates all linked slave displays with the given image |
void |
updateSlaves(java.lang.String message)
updates all linked slave display with the given message |
Methods inherited from class visad.ActionImpl |
---|
disableAction, enableAction, findReference, getCurrentActionThread, getLinks, getName, run, setEnabled, setName, setThreadPoolMaximum, stop, stopThreadPool, thingChanged, waitForTasks |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface visad.Action |
---|
getName |
Methods inherited from interface visad.ThingChangedListener |
---|
thingChanged |
Constructor Detail |
---|
public DisplayImpl(java.lang.String name, DisplayRenderer renderer) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public DisplayImpl(RemoteDisplay rmtDpy, DisplayRenderer renderer) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public DisplayImpl(RemoteDisplay rmtDpy, DisplayRenderer renderer, boolean cl) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
Method Detail |
---|
protected void syncRemoteData(RemoteDisplay rmtDpy) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public void notifyListeners(int id, int x, int y) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public void notifyListeners(DisplayEvent evt) throws VisADException, java.rmi.RemoteException
DisplayListener
s.
evt
- The DisplayEvent
to be passed to the
DisplayListener
s.
VisADException
- if a VisAD failure occurs.
java.rmi.RemoteException
- if a Java RMI failure occurs.public void addDisplayListener(DisplayListener listener)
addDisplayListener
in interface LocalDisplay
public void removeDisplayListener(DisplayListener listener)
removeDisplayListener
in interface LocalDisplay
listener
- The listener to be removed. Nothing happens
if the listener isn't registered with this
instance.public java.awt.Component getComponent()
getComponent
in interface LocalDisplay
public void setComponent(java.awt.Component c)
public void reAutoScale()
public void setAlwaysAutoScale(boolean a)
public void reDisplayAll()
public void addSlave(RemoteSlaveDisplay display)
addSlave
in interface Display
public void removeSlave(RemoteSlaveDisplay display)
removeSlave
in interface Display
public void removeAllSlaves()
removeAllSlaves
in interface Display
public boolean hasSlaves()
hasSlaves
in interface Display
public void updateSlaves(java.awt.image.BufferedImage img)
public void updateSlaves(java.lang.String message)
public void enableEvent(int id)
id
- DisplayEvent type to enable. Valid types are:
public void disableEvent(int id)
id
- DisplayEvent type to disable. Valid types are:
public boolean isEventEnabled(int id)
public void addReference(ThingReference ref) throws VisADException, java.rmi.RemoteException
ScalarMaps
have been made.
addReference
in interface Action
addReference
in class ActionImpl
ref
- data reference
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.ActionImpl.thingChanged(ThingChangedEvent)
,
ThingReference.addThingChangedListener(ThingChangedListener, long)
public void replaceReference(RemoteDisplay rDpy, ThingReference ref) throws VisADException, java.rmi.RemoteException
rDpy
- Remote display.ref
- Local reference which will replace the previous
reference.
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.addReference(visad.ThingReference)
public void addReference(DataReference ref, ConstantMap[] constant_maps) throws VisADException, java.rmi.RemoteException
DataReferenceImpl
.
This method may only be invoked after all links to
ScalarMaps
have been made.
The ConstantMap
array applies only
to the rendering reference.
addReference
in interface Display
ref
- data referenceconstant_maps
- array of ConstantMaps
associated with the data reference
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.public void replaceReference(RemoteDisplay rDpy, DataReference ref, ConstantMap[] constant_maps) throws VisADException, java.rmi.RemoteException
rDpy
- Remote display.ref
- Local reference which will replace the previous
reference.constant_maps
- array of ConstantMaps
associated with the data reference
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.addReference(visad.DataReference, visad.ConstantMap[])
public void addReferences(DataRenderer renderer, DataReference ref) throws VisADException, java.rmi.RemoteException
DataReferenceImpl
.
This method may only be invoked after all links to
ScalarMaps
have been made.
This is a method of DisplayImpl
and
RemoteDisplayImpl
rather
than Display
renderer
- logic to render this dataref
- data reference
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.public void replaceReferences(RemoteDisplay rDpy, DataRenderer renderer, DataReference ref) throws VisADException, java.rmi.RemoteException
rDpy
- Remote display.renderer
- logic to render this dataref
- Local reference which will replace the previous
reference.
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.addReferences(visad.DataRenderer, visad.DataReference)
public void addReferences(DataRenderer renderer, DataReference ref, ConstantMap[] constant_maps) throws VisADException, java.rmi.RemoteException
DataReferenceImpl
.
This method may only be invoked after all links to
ScalarMaps
have been made.
This is a method of DisplayImpl
and
RemoteDisplayImpl
rather
than Display
addReferences
in interface Display
renderer
- logic to render this dataref
- data referenceconstant_maps
- array of ConstantMaps
associated with the data reference
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.public void replaceReferences(RemoteDisplay rDpy, DataRenderer renderer, DataReference ref, ConstantMap[] constant_maps) throws VisADException, java.rmi.RemoteException
rDpy
- Remote display.renderer
- logic to render this dataref
- Local reference which will replace the previous
reference.constant_maps
- array of ConstantMaps
associated with the data reference
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data reference to the remote display.addReferences(visad.DataRenderer, visad.DataReference, visad.ConstantMap[])
public void addReferences(DataRenderer renderer, DataReference[] refs) throws VisADException, java.rmi.RemoteException
DataReferenceImpls
.
This method may only be invoked after all links to
ScalarMaps
have been made.
This is a method of DisplayImpl
and
RemoteDisplayImpl
rather
than Display
renderer
- logic to render this datarefs
- array of data references
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data references to the remote display.public void replaceReferences(RemoteDisplay rDpy, DataRenderer renderer, DataReference[] refs) throws VisADException, java.rmi.RemoteException
rDpy
- Remote display.renderer
- logic to render this datarefs
- array of local data references
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data references to the remote display.addReferences(visad.DataRenderer, visad.DataReference[])
public void addReferences(DataRenderer renderer, DataReference[] refs, ConstantMap[][] constant_maps) throws VisADException, java.rmi.RemoteException
DataReferenceImpls
.
This method may only be invoked after all links to ScalarMaps
have been made.
The maps[i] array applies only to rendering refs[i].
This is a method of DisplayImpl
and
RemoteDisplayImpl
rather
than Display
addReferences
in interface LocalDisplay
renderer
- logic to render this datarefs
- array of data referencesconstant_maps
- array of ConstantMaps
associated with data references
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data references to the remote display.public void replaceReferences(RemoteDisplay rDpy, DataRenderer renderer, DataReference[] refs, ConstantMap[][] constant_maps) throws VisADException, java.rmi.RemoteException
replaceReferences
in interface LocalDisplay
rDpy
- Remote display.renderer
- logic to render this datarefs
- array of data referencesconstant_maps
- array of ConstantMaps
associated with data references.
VisADException
- if there was a problem with one or more
parameters.
java.rmi.RemoteException
- if there was a problem adding the
data references to the remote display.addReferences(visad.DataRenderer, visad.DataReference[], visad.ConstantMap[][])
public void removeReference(ThingReference ref) throws VisADException, java.rmi.RemoteException
removeReference
in interface Action
removeReference
in class ActionImpl
ref
- The reference to be removed.
RemoteVisADException
- if the reference isn't a ThingReferenceImpl
.
ReferenceException
- if the reference isn't a part of this
instance.
VisADException
- if a VisAD failure occurs.
java.rmi.RemoteException
- if a Java RMI failure occurs.public void removeAllReferences() throws VisADException, java.rmi.RemoteException
removeAllReferences
in interface Action
removeAllReferences
in class ActionImpl
VisADException
java.rmi.RemoteException
public void controlChanged()
public boolean checkTicks()
checkTicks
in class ActionImpl
public void destroy() throws VisADException, java.rmi.RemoteException
destroy
in interface Display
VisADException
java.rmi.RemoteException
public void doAction() throws VisADException, java.rmi.RemoteException
doAction
in class ActionImpl
VisADException
java.rmi.RemoteException
protected abstract DisplayRenderer getDefaultDisplayRenderer()
public DisplayRenderer getDisplayRenderer()
getDisplayRenderer
in interface LocalDisplay
public java.util.Vector getRendererVector()
getRendererVector
in interface LocalDisplay
getRenderers()
public int getDisplayScalarCount()
public DisplayRealType getDisplayScalar(int index)
public int getDisplayScalarIndex(DisplayRealType dreal)
public int getScalarCount()
public ScalarType getScalar(int index)
public int getScalarIndex(ScalarType real) throws java.rmi.RemoteException
java.rmi.RemoteException
public void addMap(ScalarMap map) throws VisADException, java.rmi.RemoteException
addMap
in interface Display
VisADException
java.rmi.RemoteException
public void addMap(ScalarMap map, int remoteId) throws VisADException, java.rmi.RemoteException
VisADException
java.rmi.RemoteException
public void clearMaps() throws VisADException, java.rmi.RemoteException
clearMaps
in interface Display
VisADException
java.rmi.RemoteException
public java.util.Vector getMapVector()
LocalDisplay
getMapVector
in interface LocalDisplay
public java.util.Vector getConstantMapVector()
getConstantMapVector
in interface Display
public int getConnectionID(RemoteDisplay rmtDpy) throws java.rmi.RemoteException
java.rmi.RemoteException
public void addControl(Control control)
public Control getControl(java.lang.Class c)
getControl
in interface LocalDisplay
public Control getControl(java.lang.Class c, int inst)
getControl
in interface LocalDisplay
public java.util.Vector getControls(java.lang.Class c)
getControls
in interface LocalDisplay
public int getNumberOfControls()
public java.util.Vector getControlVector()
public java.awt.Container getWidgetPanel()
getWidgetPanel
in interface LocalDisplay
public int getValueArrayLength()
public int[] getValueToScalar()
public int[] getValueToMap()
public abstract ProjectionControl getProjectionControl()
getProjectionControl
in interface LocalDisplay
public abstract GraphicsModeControl getGraphicsModeControl()
getGraphicsModeControl
in interface LocalDisplay
public static void delay(int millis)
new visad.util.Delay(millis)
instead.
public static void printStack(java.lang.String message)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.Vector getRenderers()
getRendererVector()
.
getRenderers
in interface LocalDisplay
getRendererVector()
public int getAPI() throws VisADException
VisADException
public DisplayMonitor getDisplayMonitor()
DisplayMonitor
associated with this
Display
.
public DisplaySync getDisplaySync()
DisplaySync
associated with this
Display
.
public void setMouseBehavior(MouseBehavior m)
public MouseBehavior getMouseBehavior()
public double[] make_matrix(double rotx, double roty, double rotz, double scale, double transx, double transy, double transz)
make_matrix
in interface LocalDisplay
public double[] multiply_matrix(double[] a, double[] b)
multiply_matrix
in interface LocalDisplay
public java.awt.image.BufferedImage getImage()
getImage
in interface LocalDisplay
public java.awt.image.BufferedImage getImage(boolean sync)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String pre)
public java.awt.print.Printable getPrintable()
PrinterJob printJob = PrinterJob.getPrinterJob(); PageFormat pf = printJob.defaultPage(); printJob.setPrintable(display.getPrintable(), pf); if (printJob.printDialog()) { try { printJob.print(); } catch (Exception pe) { pe.printStackTrace(); } }
public void connectionFailed(DataRenderer renderer, DataDisplayLink link)
public void addRendererSourceListener(RendererSourceListener listener)
DataRenderer
s.
listener
- Object to add.public void removeRendererSourceListener(RendererSourceListener listener)
DataRenderer
deletion list.
listener
- Object to remove.public void addDataSourceListener(RemoteSourceListener listener)
public void removeDataSourceListener(RemoteSourceListener listener)
public void addRemoteSourceListener(RemoteSourceListener listener)
listener
- Object to send change notifications.public void removeRemoteSourceListener(RemoteSourceListener listener)
listener
- Object to be removed.public void lostCollabConnection(int id)
RemoteSourceListener
s that the specified collaborative
connection has been lost.
id
- ID of lost connection.public void addMessageListener(MessageListener listener)
addMessageListener
in interface LocalDisplay
listener
- New message receiver.public void removeMessageListener(MessageListener listener)
removeMessageListener
in interface LocalDisplay
listener
- Object to remove.public void sendMessage(MessageEvent msg) throws java.rmi.RemoteException
sendMessage
in interface Display
msg
- Message being sent.
java.rmi.RemoteException
public void addActivityHandler(ActivityHandler ah) throws VisADException
addActivityHandler
in interface LocalDisplay
ah
- Activity handler.
VisADException
- If the handler couldn't be added.public void removeActivityHandler(ActivityHandler ah) throws VisADException
removeActivityHandler
in interface LocalDisplay
ah
- Activity handler.
VisADException
- If the handler couldn't be removed.public void updateBusyStatus()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |