com.partnersoft.modules.inspection.app
Class InspectionFormLogic

java.lang.Object
  extended by com.partnersoft.maps.model.AbstractModuleLogic
      extended by com.partnersoft.modules.inspection.app.InspectionFormLogic

public class InspectionFormLogic
extends com.partnersoft.maps.model.AbstractModuleLogic

Author:
rstepanski

Constructor Summary
InspectionFormLogic(ManageModulesKit kit)
           
 
Method Summary
 java.lang.Object addAndSelect(com.partnersoft.maps.model.MapEditContext context)
           
 ManageModulesItem builtInForGuid(java.lang.String guid)
           
 ManageModulesItem builtInForName(java.lang.String name)
           
 void deleteFormCog(java.lang.String name)
           
 void deleteItem(ManageModulesItem item)
          Deletes an item permanently from the module schema.
 com.partnersoft.geometry.xy.XyBounds fieldBoundsForGrid(com.partnersoft.geometry.xy.XyGrid grid, int height, int width, int tabHeight)
           
 ManageModulesItem fieldForGuid(java.lang.String guid)
           
 ManageModulesItem fieldForName(java.lang.String name)
           
 com.partnersoft.geometry.xy.XyBounds formBoundsForGrid(com.partnersoft.geometry.xy.XyGrid grid, int height, int width)
           
 ManageModulesItem formForGuid(java.lang.String guid)
           
 ManageModulesForm formForLocation(com.partnersoft.geometry.xy.XyPoint spot)
           
 ManageModulesItem formForName(java.lang.String name)
           
 java.lang.String formGuidForLocation(com.partnersoft.geometry.xy.XyPoint spot)
           
 void generateForms()
          Generates both cogs and scripts for forms.
 java.util.List<com.partnersoft.maps.model.MapDataItem> getAnchors(com.partnersoft.geometry.xy.XyPoint point, double scale)
           
 InspectionFormData getFormData()
           
 com.partnersoft.io.vfs.VfsDirectory getFormsDirectory()
          Uses active module to find the scripts/SubtypeForms directory.
 ManageModulesKit getManageModulesKit()
           
 com.partnersoft.geometry.xy.XyGrid gridForForm(ManageModulesForm form)
           
 ManageModulesItem itemForGuid(java.lang.String guid)
          Checks all ManageModulesData containers for an item matching this guid.
 ManageModulesItem labelForGuid(java.lang.String guid)
           
 ManageModulesItem labelForName(java.lang.String name)
           
 void loadFormsAndCsv(InspectionCsvData data)
           
 java.lang.Object moveAndSelect(com.partnersoft.maps.model.MapEditContext context)
           
 ManageModulesItem moveForm(com.partnersoft.maps.model.MapEditContext context)
           
 ManageModulesItem moveFormLine(com.partnersoft.maps.model.MapEditContext context)
           
 ManageModulesItem moveFormTabLine(com.partnersoft.maps.model.MapEditContext context)
           
 ManageModulesItem moveManageModulesItem(com.partnersoft.maps.model.MapEditContext context)
           
 ManageModulesItem removeItemFromAllForms(ManageModulesItem item)
           
 void resetAllFormData()
           
 void resetFields()
           
 void resetForms()
           
 void resetLabels()
           
 void resetTabs()
           
 java.lang.Object rotateAndSelect(com.partnersoft.maps.model.MapEditContext context)
           
 void setModule(com.partnersoft.system.Module module)
           
 com.partnersoft.geometry.xy.XyBounds tabBoundsForGrid(com.partnersoft.geometry.xy.XyGrid grid, int height, int width, int tabHeight)
           
 ManageModulesItem tabForGuid(java.lang.String guid)
           
 ManageModulesItem tabForName(java.lang.String name)
           
 
Methods inherited from class com.partnersoft.maps.model.AbstractModuleLogic
enableAndRefresh, getKit, refresh
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InspectionFormLogic

public InspectionFormLogic(ManageModulesKit kit)
Parameters:
kit -
Method Detail

getFormData

public InspectionFormData getFormData()

addAndSelect

public java.lang.Object addAndSelect(com.partnersoft.maps.model.MapEditContext context)
Specified by:
addAndSelect in class com.partnersoft.maps.model.AbstractModuleLogic

formGuidForLocation

public java.lang.String formGuidForLocation(com.partnersoft.geometry.xy.XyPoint spot)

formForLocation

public ManageModulesForm formForLocation(com.partnersoft.geometry.xy.XyPoint spot)

deleteFormCog

public void deleteFormCog(java.lang.String name)

deleteItem

public void deleteItem(ManageModulesItem item)
Deletes an item permanently from the module schema.

Parameters:
item -

gridForForm

public com.partnersoft.geometry.xy.XyGrid gridForForm(ManageModulesForm form)

formBoundsForGrid

public com.partnersoft.geometry.xy.XyBounds formBoundsForGrid(com.partnersoft.geometry.xy.XyGrid grid,
                                                              int height,
                                                              int width)

tabBoundsForGrid

public com.partnersoft.geometry.xy.XyBounds tabBoundsForGrid(com.partnersoft.geometry.xy.XyGrid grid,
                                                             int height,
                                                             int width,
                                                             int tabHeight)

fieldBoundsForGrid

public com.partnersoft.geometry.xy.XyBounds fieldBoundsForGrid(com.partnersoft.geometry.xy.XyGrid grid,
                                                               int height,
                                                               int width,
                                                               int tabHeight)

getAnchors

public java.util.List<com.partnersoft.maps.model.MapDataItem> getAnchors(com.partnersoft.geometry.xy.XyPoint point,
                                                                         double scale)

getManageModulesKit

public ManageModulesKit getManageModulesKit()

moveAndSelect

public java.lang.Object moveAndSelect(com.partnersoft.maps.model.MapEditContext context)
Specified by:
moveAndSelect in class com.partnersoft.maps.model.AbstractModuleLogic

moveManageModulesItem

public ManageModulesItem moveManageModulesItem(com.partnersoft.maps.model.MapEditContext context)

moveForm

public ManageModulesItem moveForm(com.partnersoft.maps.model.MapEditContext context)

moveFormLine

public ManageModulesItem moveFormLine(com.partnersoft.maps.model.MapEditContext context)

moveFormTabLine

public ManageModulesItem moveFormTabLine(com.partnersoft.maps.model.MapEditContext context)

loadFormsAndCsv

public void loadFormsAndCsv(InspectionCsvData data)

generateForms

public void generateForms()
Generates both cogs and scripts for forms.


resetAllFormData

public void resetAllFormData()

resetForms

public void resetForms()

resetFields

public void resetFields()

resetLabels

public void resetLabels()

resetTabs

public void resetTabs()

removeItemFromAllForms

public ManageModulesItem removeItemFromAllForms(ManageModulesItem item)

itemForGuid

public ManageModulesItem itemForGuid(java.lang.String guid)
Checks all ManageModulesData containers for an item matching this guid.

Parameters:
guid -
Returns:

getFormsDirectory

public com.partnersoft.io.vfs.VfsDirectory getFormsDirectory()
Uses active module to find the scripts/SubtypeForms directory. Returns null if the module hasn't been set.

Returns:
VfsDirectory for active module/scripts/SubtypeForms, or null if module not set.

fieldForGuid

public ManageModulesItem fieldForGuid(java.lang.String guid)

labelForGuid

public ManageModulesItem labelForGuid(java.lang.String guid)

tabForGuid

public ManageModulesItem tabForGuid(java.lang.String guid)

formForGuid

public ManageModulesItem formForGuid(java.lang.String guid)

builtInForGuid

public ManageModulesItem builtInForGuid(java.lang.String guid)

builtInForName

public ManageModulesItem builtInForName(java.lang.String name)

setModule

public void setModule(com.partnersoft.system.Module module)

fieldForName

public ManageModulesItem fieldForName(java.lang.String name)

labelForName

public ManageModulesItem labelForName(java.lang.String name)

tabForName

public ManageModulesItem tabForName(java.lang.String name)

formForName

public ManageModulesItem formForName(java.lang.String name)

rotateAndSelect

public java.lang.Object rotateAndSelect(com.partnersoft.maps.model.MapEditContext context)
Specified by:
rotateAndSelect in class com.partnersoft.maps.model.AbstractModuleLogic