project35.desktopDeployment
Class MultiListTypeManager

java.lang.Object
  extended by project35.desktopDeployment.MultiListTypeManager
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, ListTypeManager

public class MultiListTypeManager
extends java.lang.Object
implements ListTypeManager, java.awt.event.ActionListener

Handles the part of lists that indicate it can support multiple types of subrecords.


Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.
Copyright (c) 2008 Kevin Garwood for Project35. This code is licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)

Constructor Summary
MultiListTypeManager(Project35FormContext project35FormContext)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          updates the currently selected value in the combination box.
 void changeFont(java.awt.Font font)
           
 RecordModel createRecordModelFromType()
           
 void deregisterToolTipComponents()
           
 void enableContextHelp(boolean enableContextHelp)
          controls whether context sensitive help is enabled for this UI component.
 java.lang.String getSelectedType()
           
 java.awt.Component getTypeArea()
           
 java.lang.String[] getTypes()
           
 void reset()
           
 void setEnabled(boolean isEnabled)
           
 void setFont(java.awt.Font font)
           
 void setListTypeListener(ListTypeListener listTypeListener)
          sets the listener for the type changes.
 void setModel(ListFieldModel listFieldModel)
          sets the model for the list type manager.
 void setTypes(java.lang.String[] childTypes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiListTypeManager

public MultiListTypeManager(Project35FormContext project35FormContext)
Method Detail

setModel

public void setModel(ListFieldModel listFieldModel)
sets the model for the list type manager. The manager needs to extract the types of subrecords that are possible for the list

Specified by:
setModel in interface ListTypeManager
Parameters:
listFieldModel - the list field model

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
updates the currently selected value in the combination box. Also alerts objects that might be listening to changes in the type

Specified by:
actionPerformed in interface java.awt.event.ActionListener

deregisterToolTipComponents

public void deregisterToolTipComponents()
Specified by:
deregisterToolTipComponents in interface ListTypeManager

getSelectedType

public java.lang.String getSelectedType()
Specified by:
getSelectedType in interface ListTypeManager
Returns:
the type of child record type that will be created when end-users create a new record in the list field.

setListTypeListener

public void setListTypeListener(ListTypeListener listTypeListener)
Description copied from interface: ListTypeManager
sets the listener for the type changes. for example, the list view will update to show only records that correspond to the new selected subrecord type

Specified by:
setListTypeListener in interface ListTypeManager
Parameters:
listTypeListener - listens to changes in the list type. The only example of ListTypeListener appears to be ListValueManager but this may change in the future.

createRecordModelFromType

public RecordModel createRecordModelFromType()
Specified by:
createRecordModelFromType in interface ListTypeManager
Returns:
an instance of a record of the selected subrecord type

setEnabled

public void setEnabled(boolean isEnabled)

reset

public void reset()
Specified by:
reset in interface ListTypeManager

getTypes

public java.lang.String[] getTypes()
Specified by:
getTypes in interface ListTypeManager
Returns:
an array of child record types defined in the XML Schema

getTypeArea

public java.awt.Component getTypeArea()
Specified by:
getTypeArea in interface ListTypeManager
Returns:
the component that describes the types. in MultiTypeManager, this appears as Show: [combination box with child subrecord types]

setTypes

public void setTypes(java.lang.String[] childTypes)

setFont

public void setFont(java.awt.Font font)
Specified by:
setFont in interface ListTypeManager

enableContextHelp

public void enableContextHelp(boolean enableContextHelp)
Description copied from interface: ListTypeManager
controls whether context sensitive help is enabled for this UI component. if true, end-users can hover over the UI components for showing type (eg: "Show" in MultiListTypeManager) if false, context sensitive help is not active

Specified by:
enableContextHelp in interface ListTypeManager

changeFont

public void changeFont(java.awt.Font font)
Specified by:
changeFont in interface ListTypeManager