Compile Time Changes

class OptionMakeSpecialDialog

Removed: public void onOKButtonClick(Object sender, Object args) {}
  • This method was originally overridden to allow for returning an OptionSpecial type on OK button click
  • The super class now calls generateSpecial to create the new special on OK button click

class QueryProdPartGridBuilderEnv

In 16.5, the ProdPartQueryDialogDataEnv has changed it's backing data structures, replacing the str->Part parts, int->str rowIDs, and str->str{} options maps with a single QueryRowData[] queryRows data sequence. Cell highlighting has also been introduced in the QueryDialog.

As a result, the following functions have been removed and added to QueryProdPartGridBuilderEnv.

Removed: public str rowIdentifier(Object data) {}
Added: public GridCell[] getRowCells(Object data) {}
Added: public Brush getCellBrush(Object data, int columnIdx) {}

class ProdPartQueryDialogBehavior

New Add Option Feature

With the addition of the new "Add Option" feature in the query dialog and the new data structure of QueryDialogDataEnv, changes in ProdPartQueryDialogBehavior have been made.

  • Overrides of top window related functions:
    • initTopWindow to utilize new ProdPartQueryControlWindow for ProdParts
    • initTopWindowEvents to handle events from ProdPartQueryControlWindow
    • onAddOptionBtnClicked to handle add option button click from ProdPartQueryControlWindow
  • Overrides of new getCustomSpecialDialog function:
    • Overidden to return custom special dialog for a ProdPart option
  • Modified interfaces to support new index-driven data model (vs. previous str-based data model)
    • Shown below

The following interface additions, removals, and changes have been made in ProdPartQueryDialogBehavior:

// ADDED/REMOVED INTERFACES
Added: public SubWindow initTopWindow(QueryDialog parent) {}
Added: public void initTopWindowEvents(SubWindow topWindow) {}
Added: public DialogWindow getCustomSpecialDialog(QueryDialog dialog, int row) {}
Added: extend public void onAddOptionBtnClicked(Object sender, Object args) {}
Removed: extend public str getPartIDFromOptionID(QueryDialog dialog, str id) {}
Removed: extend public Part getPartFromOptionID(QueryDialog dialog, str id) {}

// MODIFIED INTERFACES
Old: extend public str getOptCodeFromGrid(QueryDialog dialog, str id) {}
New: extend public str getOptCodeFromGrid(QueryDialog dialog, int row) {}

Old: extend public str getOptDescriptionFromGrid(QueryDialog dialog, str id) {}
New: extend public str getOptDescriptionFromGrid(QueryDialog dialog, int row) {}

Old: public DialogWindow getSpecialDialog(QueryDialog dialog, str id) {}
New: public DialogWindow getSpecialDialog(QueryDialog dialog, int row) {}

Old: extend public DialogWindow getOptionSpecialDialog(QueryDialog dialog, str id |, Part part) {}
New: extend public DialogWindow getOptionSpecialDialog(QueryDialog dialog, int row |, Part part) {}

class ProdPartQueryDialogDataEnv

With the new data structure of QueryDialogDataEnv, changes in ProdPartQueryDialogDataEnv have been made.

  • New data building functions:
    • buildQueryRowData: Overridden to support ProdPart option rows
    • buildPartOptions: Created to build part option rows for ProdParts
    • createPartRowData: Overridden to create QueryProdPartRowDatas for ProdPart rows
    • createOptionRowData: Created to build QueryOptionRowDatas for ProdPart option rows
    • refreshQueryRowData: Overridden to optimize rebuild process
  • Removed public str->str{} options field:
    • No longer needed with new data structure
    • Option rows are stored in new QueryRowData[] queryRows as QueryOptionRowDatas
  • Removed old data building/manipulation functions:
    • setParts: No longer needed with new data structure
    • buildParts: ''
    • buildPartOptions: ''
    • getPartIDFromOptionID: ''
    • getPartFromOptionID: ''
    • getSpecial: Logic has been moved to new QueryRowData type
    • putSpecial: ''
    • removeSpecial: ''

The following interface additions and removals have been made in ProdPartQueryDialogDataEnv:

// ADDED INTERFACES
Added: public void buildQueryRowData(Part[] parts=null) {}
Added: extend public void buildPartOptions(QueryRowData partRow) {}
Added: public QueryRowData createPartRowData(Part part) {}
Added: extend public QueryRowData createOptionRowData(SpecOption option, QueryRowData partRow) {}
Added: public void refreshQueryRowData() {}

// REMOVED INTERFACES
Removed: public str->str{} options;
Removed: public Part[] setParts(Part[] value) {}
Removed: public void buildParts() {}
Removed: extend public void buildPartOptions(str partRowID, ProdPart part) {}
Removed: extend public void buildPartOptions(ProdPart part) {}
Removed: public PartSpecial getSpecial(str id) {}
Removed: public void putSpecial(str id, PartSpecial special) {}
Removed: public void removeSpecial(str id) {}
Removed: extend public str getPartIDFromOptionID(str id) {}
Removed: extend public Part getPartFromOptionID(str id) {}

Runtime/Behavior Changes

class OptionMakeSpecialDialog

Added: public PartSpecial generateSpecial() {}

The helper method generateSpecial() has been overridden to streamline the process of creating OptionSpecial objects from dialog input.

Behavior
  • If original special was of the OptionSpecial type, calls and returns generateOptionSpecial value
  • Otherwise, returns the super() value

Added: extend public OptionSpecial generateOptionSpecial(OptionSpecial original) {}

The helper method generateOptionSpecial() has been created to create OptionSpecial objects from dialog input.

Behavior
  • If original special was of the CustomOptionSpecial type, creates and returns a CustomOptionSpecial made from the dialogs input values
  • Otherwise, returns an OptionSpecial given the dialogs input values

class QueryOptionRowData

In 16.5, the ProdPartQueryDialogDataEnv has changed it's backing data structures, replacing the str->Part parts, int->str rowIDs, and str->str{} options maps with a single QueryRowData[] queryRows data sequence. As a result, the subclass QueryOptionRowData has been created to represent option rows in the query dialog.

  • Encapsulates a SpecOption and it's parent Part
  • Handles manipulation of the SpecOptions special on the owning Part
  • Contains a new field to track the options parent row (public QueryRowData parent;).

Interface

/**
 * QueryOptionRowData
 * 
 * This class is responsible for managing 
 * data for a SpecOption row in a QueryDialog.
 */
public class QueryOptionRowData extends QueryRowData {

    /**
     * Parent QueryRowData object.
     */
    public QueryRowData parent : copy=reference;

    /**
     * Constructor.
     * @id ID for this row
     * @data The data object to associate with this row
     */
    public constructor(str id, Object data, QueryRowData parent=null) { ... }

    /**
     * SpecOption option associated with this row.
     * @return The SpecOption object associated with this row.
     */
    extend public SpecOption option() { ... }

    /**
     * Parent Part to this row.
     * @recurse optional flag to recurse tree to parent Part
     * @return The Part object associated with this row's parent.
     */
    extend public Part parentPart(bool recurse=false) { ... }

    /**
     * Parent SpecOption to this row.
     * @return The SpecOption object associated with this row's parent.a
     */
    extend public SpecOption parentOption() { ... }

    /**
     * Get the special associated with this row.
     * Override to get the specific special handling logic.
     * @return The PartSpecial object associated with this row
     */
    public PartSpecial getSpecial() { ... }

    /**
     * Assign a special to this row.
     * Override to get the specific special handling logic.
     * @special The PartSpecial object to associate with this row
     */
    public void putSpecial(PartSpecial special) { ... }
    
    /**
     * Remove the special from this row.
     * Override to get the specific special handling logic.
     */
    public void removeSpecial() { ... }
}

class ProdPartQueryControlWindow

New Add Option Button

With the addition of the new "Add Option" feature in the query dialog, a new override of the QueryControlWindow has been added. It contains an additional button (addOptionButton) for the new adding custom options feature.

public class ProdPartQueryControlWindow extends QueryControlWindow {
    
    /**
     * Add custom option button.
     */
    public QueryButton addOptionButton;
    
       
    /**
     * Initialize controls.
     */
    public void initControls() { ... }
    
    
    /**
     * Align controls.
     */
    public void alignControls() { ... }
}

class QueryProdPartRowData

In 16.5, the ProdPartQueryDialogDataEnv has changed it's backing data structures, replacing the str->Part parts, int->str rowIDs, and str->str{} options maps with a single QueryRowData[] queryRows data sequence. As a result, the subclass QueryProdPartRowData has been created to represent ProdPart rows in the query dialog.

  • Only overridden to custom handle putSpecial:
    • Allows CustomOptionSpecials to be created when a ProdPart row is selected in the query dialog

Interface

/**
 * QueryProdPartRowData
 * 
 * This class is responsible for managing 
 * data for a ProdPart row in a QueryDialog.
 */
public class QueryProdPartRowData extends QueryPartRowData {

    /**
     * Put a special to this row.
     * @special The PartSpecial object to put
     */
    public void putSpecial(PartSpecial special) {
        if (special as CustomOptionSpecial) {
            if (data as ProdPart) {
                data.putOptSpecial(special.option(), special);
            }
        } else {
            super(..);
        }
    }
}