macaw.presentationLayer
Class VariableEditor

java.lang.Object
  extended by macaw.presentationLayer.VariableEditor
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, DisplayableListParentForm
Direct Known Subclasses:
DerivedVariableEditor, RawVariableEditor

public abstract class VariableEditor
extends java.lang.Object
implements java.awt.event.ActionListener, DisplayableListParentForm


Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

Field Summary
protected  javax.swing.JComboBox aliasFilePathChoicesField
           
protected  java.lang.String aliasFilePathLabelText
           
protected  boolean allowWriteAccess
           
protected  AlternativeVariableSelectionPanel alternativeVariableSelectionPanel
           
protected  javax.swing.JComboBox availabilityChoicesField
           
protected  java.lang.String availabilityLabelText
           
protected  javax.swing.JComboBox categoryChoicesField
           
protected  java.lang.String categoryLabelText
           
protected  CleaningStatePanel cleaningStatePanel
           
protected  javax.swing.JButton close
           
protected  boolean committedChanges
           
protected  User currentUser
           
protected  java.lang.String currentUserID
           
protected  MacawCurationAPI database
           
protected  javax.swing.JDialog dialog
           
protected  javax.swing.JButton editLabelValues
           
protected  javax.swing.JTextField filePathField
           
protected  java.lang.String filePathLabelText
           
protected  javax.swing.JTextArea instructionsTextArea
           
protected  javax.swing.JCheckBox isCodedField
           
protected  java.lang.String isCodedText
           
protected  javax.swing.JTextField labelField
           
protected  java.lang.String labelLabelText
           
protected  Log log
           
protected  javax.swing.JTextField nameField
           
protected  java.lang.String nameLabelText
           
protected  javax.swing.JTextArea notesField
           
protected  OKClosePanel okCancelPanel
           
protected  OntologyTermsPanel ontologyTermsPanel
           
protected  javax.swing.JButton save
           
protected  SessionProperties sessionProperties
           
protected  javax.swing.JButton showChangeHistory
           
protected  SupportingDocumentsPanel supportingDocumentsPanel
           
protected  UserInterfaceFactory userInterfaceFactory
           
protected  javax.swing.JTextField yearField
           
protected  java.lang.String yearLabelText
           
 
Constructor Summary
VariableEditor(SessionProperties sessionProperties, boolean allowWriteAccess)
           
 
Method Summary
abstract  void actionPerformed(java.awt.event.ActionEvent event)
           
protected  void addField(java.lang.String fieldName, javax.swing.JComponent editingComponent, javax.swing.JPanel parentPanel, java.awt.GridBagConstraints parentPanelGC)
           
protected  void close()
           
abstract  void commitChanges()
           
protected  javax.swing.JPanel createDataLibraryAndFilePanel()
           
protected  javax.swing.JPanel createIsCleanedPanel()
           
protected  javax.swing.JPanel createNameLabelPanel()
           
protected  javax.swing.JPanel createNotesFieldPanel()
           
protected  javax.swing.JPanel createRubricCardFields()
           
protected  javax.swing.JPanel createRubricCardPanel()
           
protected  javax.swing.JPanel createYearFormQuestionNumberPanel()
           
protected  void editLabelValues()
           
abstract  Displayable getData()
           
 boolean isCancelled()
           
protected  void restoreVariableFields(Variable variable)
           
protected  void saveVariableFields(Variable variable)
           
protected  void setData(Variable variable, boolean isNewRecord)
           
 void show()
           
protected  void showChangeHistory()
           
protected  void updateFilePath()
           
protected  void updateValueLabelsButtonState(Variable rawVariable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionProperties

protected SessionProperties sessionProperties

userInterfaceFactory

protected UserInterfaceFactory userInterfaceFactory

currentUser

protected User currentUser

currentUserID

protected java.lang.String currentUserID

log

protected Log log

database

protected MacawCurationAPI database

dialog

protected javax.swing.JDialog dialog

instructionsTextArea

protected javax.swing.JTextArea instructionsTextArea

isCodedText

protected java.lang.String isCodedText

isCodedField

protected javax.swing.JCheckBox isCodedField

nameLabelText

protected java.lang.String nameLabelText

nameField

protected javax.swing.JTextField nameField

labelLabelText

protected java.lang.String labelLabelText

labelField

protected javax.swing.JTextField labelField

categoryLabelText

protected java.lang.String categoryLabelText

categoryChoicesField

protected javax.swing.JComboBox categoryChoicesField

cleaningStatePanel

protected CleaningStatePanel cleaningStatePanel

yearLabelText

protected java.lang.String yearLabelText

yearField

protected javax.swing.JTextField yearField

ontologyTermsPanel

protected OntologyTermsPanel ontologyTermsPanel

supportingDocumentsPanel

protected SupportingDocumentsPanel supportingDocumentsPanel

availabilityLabelText

protected java.lang.String availabilityLabelText

availabilityChoicesField

protected javax.swing.JComboBox availabilityChoicesField

aliasFilePathLabelText

protected java.lang.String aliasFilePathLabelText

aliasFilePathChoicesField

protected javax.swing.JComboBox aliasFilePathChoicesField

filePathLabelText

protected java.lang.String filePathLabelText

filePathField

protected javax.swing.JTextField filePathField

notesField

protected javax.swing.JTextArea notesField

alternativeVariableSelectionPanel

protected AlternativeVariableSelectionPanel alternativeVariableSelectionPanel

showChangeHistory

protected javax.swing.JButton showChangeHistory

editLabelValues

protected javax.swing.JButton editLabelValues

okCancelPanel

protected OKClosePanel okCancelPanel

save

protected javax.swing.JButton save

close

protected javax.swing.JButton close

committedChanges

protected boolean committedChanges

allowWriteAccess

protected boolean allowWriteAccess
Constructor Detail

VariableEditor

public VariableEditor(SessionProperties sessionProperties,
                      boolean allowWriteAccess)
Method Detail

createYearFormQuestionNumberPanel

protected javax.swing.JPanel createYearFormQuestionNumberPanel()

createNameLabelPanel

protected javax.swing.JPanel createNameLabelPanel()

createRubricCardPanel

protected javax.swing.JPanel createRubricCardPanel()

createRubricCardFields

protected javax.swing.JPanel createRubricCardFields()

createDataLibraryAndFilePanel

protected javax.swing.JPanel createDataLibraryAndFilePanel()

createNotesFieldPanel

protected javax.swing.JPanel createNotesFieldPanel()

addField

protected void addField(java.lang.String fieldName,
                        javax.swing.JComponent editingComponent,
                        javax.swing.JPanel parentPanel,
                        java.awt.GridBagConstraints parentPanelGC)

createIsCleanedPanel

protected javax.swing.JPanel createIsCleanedPanel()

isCancelled

public boolean isCancelled()

show

public void show()

setData

protected void setData(Variable variable,
                       boolean isNewRecord)

saveVariableFields

protected void saveVariableFields(Variable variable)

restoreVariableFields

protected void restoreVariableFields(Variable variable)

close

protected void close()

editLabelValues

protected void editLabelValues()

showChangeHistory

protected void showChangeHistory()

getData

public abstract Displayable getData()

updateFilePath

protected void updateFilePath()

updateValueLabelsButtonState

protected void updateValueLabelsButtonState(Variable rawVariable)

actionPerformed

public abstract void actionPerformed(java.awt.event.ActionEvent event)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

commitChanges

public abstract void commitChanges()
                            throws MacawException
Specified by:
commitChanges in interface DisplayableListParentForm
Throws:
MacawException