Search this API

y.io.graphml.input
Class QueryInputHandlersEvent

java.lang.Object
  extended by java.util.EventObject
      extended by y.io.graphml.input.QueryInputHandlersEvent
All Implemented Interfaces:
java.io.Serializable

public final class QueryInputHandlersEvent
extends java.util.EventObject

Specialized EventObject that is used for dynamic InputHandler registration.

See Also:
Serialized Form
 

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
QueryInputHandlersEvent(java.lang.Object source, GraphMLParseContext context, org.w3c.dom.Element keyDefinition, java.util.List handlers)
          Create a new instance.
 
Method Summary
 void addInputHandler(InputHandler handler)
          Register an InputHandler instance for the current getKeyDefinition().
 GraphMLParseContext getContext()
          The GraphMLParseContext instance that can queried for further information.
 org.w3c.dom.Element getKeyDefinition()
          The key definition of the GraphML attribute.
 boolean isHandled()
          Sets whether the current GraphML attribute has been processed.
 void setHandled(boolean value)
          Queries whether the current GraphML attribute has been processed.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryInputHandlersEvent

public QueryInputHandlersEvent(java.lang.Object source,
                               GraphMLParseContext context,
                               org.w3c.dom.Element keyDefinition,
                               java.util.List handlers)
Create a new instance.

Parameters:
source - The origin of the event
context - The current parse context.
keyDefinition - The current key definition
handlers - Stores the registered InputHandler instances.
See Also:
addInputHandler(InputHandler)
Method Detail

addInputHandler

public void addInputHandler(InputHandler handler)
Register an InputHandler instance for the current getKeyDefinition().

Calling this method automatically sets isHandled() to true.

Parameters:
handler - The InputHandler to register.

getKeyDefinition

public org.w3c.dom.Element getKeyDefinition()
The key definition of the GraphML attribute.

This XML element should be queried to determine if an InputHandler should be registered with addInputHandler(InputHandler).

Returns:
The current GraphML key definition.

isHandled

public boolean isHandled()
Sets whether the current GraphML attribute has been processed.

This is automatically set by calling addInputHandler(InputHandler), so it should be seldom necessary to set this property manually.

Returns:
true iff the event is completely handled.
See Also:
setHandled(boolean), addInputHandler(InputHandler)

setHandled

public void setHandled(boolean value)
Queries whether the current GraphML attribute has been processed.

This is automatically set by calling addInputHandler(InputHandler), so it should be seldom necessary to set this property manually.

Parameters:
value - true iff the event is completely handled.
See Also:
isHandled(), addInputHandler(InputHandler)

getContext

public GraphMLParseContext getContext()
The GraphMLParseContext instance that can queried for further information.

Returns:
The current parse context.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.