project35.desktopDeployment
Class SingleListTypeManager

java.lang.Object
  extended by project35.desktopDeployment.SingleListTypeManager
All Implemented Interfaces:
ListTypeManager

public class SingleListTypeManager
extends java.lang.Object
implements ListTypeManager

Handles the part of lists that indicate it can support a single type of subrecord.


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

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.


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

Constructor Summary
SingleListTypeManager(Project35FormContext project35FormContext)
           
 
Method Summary
 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()
           
 java.awt.Component getUIComponent()
           
 void reset()
           
 void setEnabled(boolean isEnabled)
           
 void setFont(java.awt.Font font)
           
 void setListTypeListener(ListTypeListener actionListener)
          sets the listener for the type changes.
 void setModel(ListFieldModel listFieldModel)
          sets the list model which will contain the list of types allowed for the corresponding list
 void setTypes(java.lang.String[] types)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleListTypeManager

public SingleListTypeManager(Project35FormContext project35FormContext)
Method Detail

setModel

public void setModel(ListFieldModel listFieldModel)
Description copied from interface: ListTypeManager
sets the list model which will contain the list of types allowed for the corresponding list

Specified by:
setModel in interface ListTypeManager

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 actionListener)
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:
actionListener - listens to changes in the list type. The only example of ListTypeListener appears to be ListValueManager but this may change in the future.

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]

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

getUIComponent

public java.awt.Component getUIComponent()

setTypes

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

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