com.inline.feature.ui
Class DefaultFeatureModelEditorService

java.lang.Object
  |
  +--com.inline.ui.service.GUIService
        |
        +--com.inline.feature.ui.DefaultFeatureModelEditorService

public class DefaultFeatureModelEditorService
extends com.inline.ui.service.GUIService
implements FeatureModelEditorService, com.inline.ui.service.WindowCustomizing


Field Summary
protected  java.util.Vector closeListeners
           
protected  com.inline.resources.ResourceReference documentRef
           
protected  FeatureModel featureModel
           
static java.lang.String I18N_FEATUREMODELEDITORSERVICE_TITLE
           
protected  com.inline.resources.ResourceRepository repository
           
protected  java.lang.String title
           
 
Fields inherited from class com.inline.ui.service.GUIService
actionController, autoScroller, dragDropManager
 
Constructor Summary
DefaultFeatureModelEditorService(com.inline.resources.ResourceRepository repository)
           
 
Method Summary
 void addCloseListener(com.inline.ui.service.CloseListening cl)
           
 void closeEditor()
          Closes the editor and possibly destroys the editor window.
 java.awt.Dimension getDefaultSize()
           
 com.inline.resources.ResourceReference getDocumentResourceReference()
          Returns the resource reference for the resource (like assembly plan) that is displayed by the editor.
 FeatureModel getFeatureModel()
          Returns the feature model associated with this editor service.
protected  com.inline.ui.service.FrameService getFrameService()
           
 java.lang.Object getModel()
           
 java.lang.String getName()
           
 Feature getSelectedFeature()
          Returns the currently selected feature or null.
 java.lang.String getTitle()
           
 javax.swing.JComponent getUI()
           
 boolean handleDragDrop(javax.swing.JComponent sourceC, java.lang.Object sourceO, javax.swing.JComponent destC, java.lang.Object destO, int modifiers)
           
 void handleGUIAction(com.inline.ui.action.GUIAction action)
          GUI Action Managing
 boolean isValidDragDrop(javax.swing.JComponent sourceC, java.lang.Object sourceO, javax.swing.JComponent destC, java.lang.Object destO, int modifiers)
           
 int isValidSourceType(javax.swing.JComponent sourceC, java.lang.Object sourceO, int modifiers)
          Drag Drop Managing
protected  FeatureModelFactory lookupFeatureModelFactory(com.inline.resources.ResourceRepository repo, com.inline.resources.ResourceReference ref, com.sun.java.util.collections.Map properties)
           
 void notifyCloseListeners()
           
 void removeCloseListener(com.inline.ui.service.CloseListening cl)
           
 void selectFeature(Feature feature)
          Selects the specified feature.
 void setDocumentResourceReference(com.inline.resources.ResourceReference ref)
          Sets the resource reference for the resource to be displayed by the editor.
 void setModel(java.lang.Object mod)
           
 void setModelNeedsUpdated()
          Returns the selected node if it is either a feature or a component.
 void setProperty(java.lang.String key, java.lang.Object value)
          Set a property value.
 void showEditor()
          Makes the editor visible.
 
Methods inherited from class com.inline.ui.service.GUIService
addAutoscrolledComponent, addDragDropDest, addDragDropSource, getActionController, getMenu, getPopup, removeAutoscrolledComponent, removeDragDropDest, removeDragDropSource, setActionController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

I18N_FEATUREMODELEDITORSERVICE_TITLE

public static final java.lang.String I18N_FEATUREMODELEDITORSERVICE_TITLE

repository

protected com.inline.resources.ResourceRepository repository

documentRef

protected com.inline.resources.ResourceReference documentRef

featureModel

protected FeatureModel featureModel

title

protected java.lang.String title

closeListeners

protected java.util.Vector closeListeners
Constructor Detail

DefaultFeatureModelEditorService

public DefaultFeatureModelEditorService(com.inline.resources.ResourceRepository repository)
Method Detail

getDocumentResourceReference

public com.inline.resources.ResourceReference getDocumentResourceReference()
Description copied from interface: FeatureModelEditorService
Returns the resource reference for the resource (like assembly plan) that is displayed by the editor.
Specified by:
getDocumentResourceReference in interface FeatureModelEditorService

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Description copied from interface: FeatureModelEditorService
Set a property value. Properties are used by the service to set up a FeatureModel.
Specified by:
setProperty in interface FeatureModelEditorService

setDocumentResourceReference

public void setDocumentResourceReference(com.inline.resources.ResourceReference ref)
Description copied from interface: FeatureModelEditorService
Sets the resource reference for the resource to be displayed by the editor.
Specified by:
setDocumentResourceReference in interface FeatureModelEditorService

getFeatureModel

public FeatureModel getFeatureModel()
Description copied from interface: FeatureModelEditorService
Returns the feature model associated with this editor service. Use that model to obtain features, create new features, remove features etc.
Specified by:
getFeatureModel in interface FeatureModelEditorService

lookupFeatureModelFactory

protected FeatureModelFactory lookupFeatureModelFactory(com.inline.resources.ResourceRepository repo,
                                                        com.inline.resources.ResourceReference ref,
                                                        com.sun.java.util.collections.Map properties)

showEditor

public void showEditor()
Description copied from interface: FeatureModelEditorService
Makes the editor visible.
Specified by:
showEditor in interface FeatureModelEditorService

closeEditor

public void closeEditor()
Description copied from interface: FeatureModelEditorService
Closes the editor and possibly destroys the editor window.
Specified by:
closeEditor in interface FeatureModelEditorService

getFrameService

protected com.inline.ui.service.FrameService getFrameService()

isValidSourceType

public int isValidSourceType(javax.swing.JComponent sourceC,
                             java.lang.Object sourceO,
                             int modifiers)
Description copied from class: com.inline.ui.service.GUIService
Drag Drop Managing
Overrides:
isValidSourceType in class com.inline.ui.service.GUIService

isValidDragDrop

public boolean isValidDragDrop(javax.swing.JComponent sourceC,
                               java.lang.Object sourceO,
                               javax.swing.JComponent destC,
                               java.lang.Object destO,
                               int modifiers)
Overrides:
isValidDragDrop in class com.inline.ui.service.GUIService

handleDragDrop

public boolean handleDragDrop(javax.swing.JComponent sourceC,
                              java.lang.Object sourceO,
                              javax.swing.JComponent destC,
                              java.lang.Object destO,
                              int modifiers)
Overrides:
handleDragDrop in class com.inline.ui.service.GUIService

handleGUIAction

public void handleGUIAction(com.inline.ui.action.GUIAction action)
Description copied from class: com.inline.ui.service.GUIService
GUI Action Managing
Overrides:
handleGUIAction in class com.inline.ui.service.GUIService

selectFeature

public void selectFeature(Feature feature)
Description copied from interface: FeatureModelEditorService
Selects the specified feature.
Specified by:
selectFeature in interface FeatureModelEditorService

getUI

public javax.swing.JComponent getUI()
Specified by:
getUI in interface com.inline.ui.service.WindowCustomizing

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface com.inline.ui.service.WindowCustomizing

getName

public java.lang.String getName()

getDefaultSize

public java.awt.Dimension getDefaultSize()
Specified by:
getDefaultSize in interface com.inline.ui.service.WindowCustomizing

setModel

public void setModel(java.lang.Object mod)
Specified by:
setModel in interface com.inline.ui.service.WindowCustomizing

getModel

public java.lang.Object getModel()
Specified by:
getModel in interface com.inline.ui.service.WindowCustomizing

getSelectedFeature

public Feature getSelectedFeature()
Description copied from interface: FeatureModelEditorService
Returns the currently selected feature or null.
Specified by:
getSelectedFeature in interface FeatureModelEditorService

addCloseListener

public void addCloseListener(com.inline.ui.service.CloseListening cl)
Specified by:
addCloseListener in interface com.inline.ui.service.WindowCustomizing

removeCloseListener

public void removeCloseListener(com.inline.ui.service.CloseListening cl)
Specified by:
removeCloseListener in interface com.inline.ui.service.WindowCustomizing

notifyCloseListeners

public void notifyCloseListeners()

setModelNeedsUpdated

public void setModelNeedsUpdated()
Returns the selected node if it is either a feature or a component. Use the getFeatureFromNode(ExtendedTreeNode) method to extract the actual feature from that component.