public class KnowledgeFlowApp extends JPanel implements PropertyChangeListener
JPanel
,
PropertyChangeListener
,
Serialized FormModifier and Type | Class and Description |
---|---|
protected class |
KnowledgeFlowApp.BeanLayout
Used for displaying the bean components and their visible
connections
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected static int |
ADDING |
protected static Properties |
BEAN_PROPERTIES
Contains the editor properties
|
protected static int |
CONNECTING |
static String |
FILE_EXTENSION
the extension for the serialized setups (Java serialization)
|
static String |
FILE_EXTENSION_XML
the extension for the serialized setups (Java serialization)
|
protected BeanContextSupport |
m_bcSupport |
protected JFileChooser |
m_FileChooser
The file chooser for selecting layout files
|
protected Environment |
m_flowEnvironment
Environment variables for the current flow
|
protected int |
m_FlowHeight
the flow layout height
|
protected int |
m_FlowWidth
the flow layout width
|
protected FileFilter |
m_KfFilter
A filter to ensure only KnowledgeFlow files in binary format get shown in
the chooser
|
protected FileFilter |
m_KOMLFilter
A filter to ensure only KnowledgeFlow files in KOML format
get shown in the chooser
|
protected LogPanel |
m_logPanel |
protected String |
m_PreferredExtension
the preferred file extension
|
protected int |
m_ScrollBarIncrementComponents
the scrollbar increment of the components scrollpane
|
protected int |
m_ScrollBarIncrementLayout
the scrollbar increment of the layout scrollpane
|
protected boolean |
m_UserComponentsInXML
whether to store the user components in XML or in binary format
|
protected FileFilter |
m_XMLFilter
A filter to ensure only KnowledgeFlow layout files in XML format get
shown in the chooser
|
protected FileFilter |
m_XStreamFilter
A filter to ensure only KnowledgeFlow files in XStream format
get shown in the chooser
|
protected static int |
MOVING |
protected static int |
NONE |
protected static String |
PROPERTY_FILE
Location of the property file for the KnowledgeFlowApp
|
static Vector |
s_startupListeners |
protected static int |
SELECTING |
protected static String |
USERCOMPONENTS_XML_EXTENSION
the extension for the user components, when serialized to XML
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
KnowledgeFlowApp(boolean showFileMenu)
Creates a new
KnowledgeFlowApp instance. |
Modifier and Type | Method and Description |
---|---|
static void |
addStartupListener(StartUpListener s)
Add a listener to be notified when startup is complete
|
void |
clearLayout() |
protected static BufferedImage |
createImage(JComponent component,
Rectangle region)
Utility method to create an image of a region of the given component
|
static void |
createSingleton(String[] args)
Create the singleton instance of the KnowledgeFlow
|
Vector |
getFlow()
Gets the current flow being edited.
|
static String |
getGlobalInfo(Object tempBean)
Utility method for grabbing the global info help (if it exists) from
an arbitrary object
|
static KnowledgeFlowApp |
getSingleton()
Return the singleton instance of the KnowledgeFlow
|
void |
loadInitialLayout(String fileName)
Loads the specified file at input
Added by Zerbetto
|
static void |
loadProperties()
Loads KnowledgeFlow properties and any plugins (adds jars to
the classpath)
|
static void |
main(String[] args)
Main method.
|
void |
propertyChange(PropertyChangeEvent e)
Accept property change events
|
void |
saveLayout(OutputStream out)
Save the knowledge flow into the OutputStream passed at input.
|
void |
setEnvironment(Environment env)
Set the environment variables to use.
|
void |
setFlow(Vector v)
Set the flow for the KnowledgeFlow to edit.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static String PROPERTY_FILE
protected static Properties BEAN_PROPERTIES
protected static final int NONE
protected static final int MOVING
protected static final int CONNECTING
protected static final int ADDING
protected static final int SELECTING
protected static final String USERCOMPONENTS_XML_EXTENSION
protected JFileChooser m_FileChooser
protected LogPanel m_logPanel
protected BeanContextSupport m_bcSupport
public static final String FILE_EXTENSION
public static final String FILE_EXTENSION_XML
protected FileFilter m_KfFilter
protected FileFilter m_KOMLFilter
protected FileFilter m_XStreamFilter
protected FileFilter m_XMLFilter
protected int m_ScrollBarIncrementLayout
protected int m_ScrollBarIncrementComponents
protected int m_FlowWidth
protected int m_FlowHeight
protected String m_PreferredExtension
protected boolean m_UserComponentsInXML
protected Environment m_flowEnvironment
public static Vector s_startupListeners
public KnowledgeFlowApp(boolean showFileMenu)
KnowledgeFlowApp
instance.public static void loadProperties()
public void setEnvironment(Environment env)
env
- public void clearLayout()
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
e
- a PropertyChangeEvent
valuepublic void setFlow(Vector v) throws Exception
v
- a Vector containing a Vector of beans and a Vector of connectionsException
- if something goes wrongpublic Vector getFlow() throws Exception
Exception
protected static BufferedImage createImage(JComponent component, Rectangle region) throws IOException
component
- the component to create an image ofregion
- the region of the component to put into the imageIOException
public void saveLayout(OutputStream out)
out
- the output stream to save the layout inpublic static String getGlobalInfo(Object tempBean)
tempBean
- the object to grab global info frompublic static void createSingleton(String[] args)
args
- can contain a file argument for loading a flow layout
(format: "file=[path to layout file]")
Modified by Zerbetto: you can specify the path of a knowledge flow layout file at inputpublic static KnowledgeFlowApp getSingleton()
public static void addStartupListener(StartUpListener s)
s
- a listener to addpublic void loadInitialLayout(String fileName)
public static void main(String[] args)
args
- a String[]
valueCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.