Removed: public void onOKButtonClick(Object sender, Object args) {}
OptionSpecial
type on OK button clickgenerateSpecial
to create the new special on OK button clickIn 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) {}
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.
initTopWindow
to utilize new ProdPartQueryControlWindow
for ProdPart
sinitTopWindowEvents
to handle events from ProdPartQueryControlWindow
onAddOptionBtnClicked
to handle add option button click from ProdPartQueryControlWindow
getCustomSpecialDialog
function:
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) {}
With the new data structure of QueryDialogDataEnv
, changes in ProdPartQueryDialogDataEnv
have been made.
buildQueryRowData
: Overridden to support ProdPart
option rowsbuildPartOptions
: Created to build part option rows for ProdPart
screatePartRowData
: Overridden to create QueryProdPartRowData
s for ProdPart
rowscreateOptionRowData
: Created to build QueryOptionRowData
s for ProdPart
option rowsrefreshQueryRowData
: Overridden to optimize rebuild processpublic str->str{} options
field:
QueryRowData[] queryRows
as QueryOptionRowData
ssetParts
: No longer needed with new data structurebuildParts
: ''buildPartOptions
: ''getPartIDFromOptionID
: ''getPartFromOptionID
: ''getSpecial
: Logic has been moved to new QueryRowData
typeputSpecial
: ''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) {}
The helper method generateSpecial()
has been overridden to streamline the process of creating OptionSpecial
objects from dialog input.
OptionSpecial
type, calls and returns generateOptionSpecial
valuesuper()
valueThe helper method generateOptionSpecial()
has been created to create OptionSpecial
objects from dialog input.
CustomOptionSpecial
type, creates and returns a CustomOptionSpecial
made from the dialogs input valuesOptionSpecial
given the dialogs input valuesIn 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.
SpecOption
and it's parent Part
SpecOption
s special on the owning Part
public QueryRowData parent;
)./** * 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() { ... } }
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() { ... } }
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.
putSpecial
:
CustomOptionSpecial
s to be created when a ProdPart
row is selected in the query dialog/** * 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(..); } } }