isReadOnly );
dialog.show();
}
private void showConditionBRLFragment() {
final BRLConditionColumn column = makeNewConditionBRLFragment();
switch ( model.getTableFormat() ) {
case EXTENDED_ENTRY:
BRLConditionColumnViewImpl popup = new BRLConditionColumnViewImpl( path,
oracle,
model,
column,
eventBus,
true,
isReadOnly );
popup.setPresenter( BRL_CONDITION_PRESENTER );
popup.show();
break;
case LIMITED_ENTRY:
LimitedEntryBRLConditionColumnViewImpl limtedEntryPopup = new LimitedEntryBRLConditionColumnViewImpl( path,
oracle,
model,
(LimitedEntryBRLConditionColumn) column,
eventBus,
true,
isReadOnly );
limtedEntryPopup.setPresenter( LIMITED_ENTRY_BRL_CONDITION_PRESENTER );
limtedEntryPopup.show();
break;
}
}
private void showActionInsert() {
final ActionInsertFactCol52 afc = makeNewActionInsertColumn();
ActionInsertFactPopup ins = new ActionInsertFactPopup( oracle,
model,
new GenericColumnCommand() {
public void execute( DTColumnConfig52 column ) {
newActionAdded( (ActionCol52) column );
}
},
afc,
true,
isReadOnly );
ins.show();
}
private void showActionSet() {
final ActionSetFieldCol52 afc = makeNewActionSetColumn();
ActionSetFieldPopup set = new ActionSetFieldPopup( oracle,
model,
new GenericColumnCommand() {
public void execute( DTColumnConfig52 column ) {
newActionAdded( (ActionCol52) column );
}
},
afc,
true,
isReadOnly );
set.show();
}
private void showActionRetract() {
final ActionRetractFactCol52 arf = makeNewActionRetractFact();
ActionRetractFactPopup popup = new ActionRetractFactPopup( model,
new GenericColumnCommand() {
public void execute( DTColumnConfig52 column ) {
newActionAdded( (ActionCol52) column );
}
},
arf,
true,
isReadOnly );
popup.show();
}
private void showActionWorkItemAction() {
final ActionWorkItemCol52 awi = makeNewActionWorkItem();
ActionWorkItemPopup popup = new ActionWorkItemPopup( path,
model,
GuidedDecisionTableWidget.this,
new GenericColumnCommand() {
public void execute( DTColumnConfig52 column ) {
newActionAdded( (ActionCol52) column );
}
},
awi,
workItemDefinitions,
true,
isReadOnly );
popup.show();
}
private void showActionWorkItemActionSet() {
final ActionWorkItemSetFieldCol52 awisf = makeNewActionWorkItemSetField();
ActionWorkItemSetFieldPopup popup = new ActionWorkItemSetFieldPopup( oracle,
model,
new GenericColumnCommand() {
public void execute( DTColumnConfig52 column ) {
newActionAdded( (ActionCol52) column );
}
},
awisf,
true,
isReadOnly );
popup.show();
}
private void showActionWorkItemActionInsert() {
final ActionWorkItemInsertFactCol52 awiif = makeNewActionWorkItemInsertFact();
ActionWorkItemInsertFactPopup popup = new ActionWorkItemInsertFactPopup( oracle,
model,
new GenericColumnCommand() {
public void execute( DTColumnConfig52 column ) {
newActionAdded( (ActionCol52) column );
}
},
awiif,
true,
isReadOnly );
popup.show();
}
private void showActionBRLFragment() {
final BRLActionColumn column = makeNewActionBRLFragment();
switch ( model.getTableFormat() ) {
case EXTENDED_ENTRY:
BRLActionColumnViewImpl popup = new BRLActionColumnViewImpl( path,
oracle,
model,
column,
eventBus,
true,
isReadOnly );
popup.setPresenter( BRL_ACTION_PRESENTER );
popup.show();
break;
case LIMITED_ENTRY:
LimitedEntryBRLActionColumnViewImpl limtedEntryPopup = new LimitedEntryBRLActionColumnViewImpl( path,
oracle,
model,
(LimitedEntryBRLActionColumn) column,
eventBus,
true,
isReadOnly );
limtedEntryPopup.setPresenter( LIMITED_ENTRY_BRL_ACTION_PRESENTER );
limtedEntryPopup.show();
break;
}
}
private void newActionAdded( ActionCol52 column ) {
dtable.addColumn( column );
refreshActionsWidget();
}
} );
//If a separator is clicked disable OK button
choice.addClickHandler( new ClickHandler() {
public void onClick( ClickEvent event ) {
int itemIndex = choice.getSelectedIndex();
if ( itemIndex < 0 ) {
return;
}
ok.setEnabled( !choice.getValue( itemIndex ).equals( SECTION_SEPARATOR ) );
}
} );
pop.setTitle( GuidedDecisionTableConstants.INSTANCE.AddNewColumn() );
pop.addAttribute( GuidedDecisionTableConstants.INSTANCE.TypeOfColumn(),
choice );
pop.addAttribute( "",
chkIncludeAdvancedOptions );
pop.addAttribute( "",
ok );
pop.show();
}
private ConditionCol52 makeNewConditionColumn() {
switch ( model.getTableFormat() ) {
case LIMITED_ENTRY:
return new LimitedEntryConditionCol52();
default:
return new ConditionCol52();
}
}
private ActionInsertFactCol52 makeNewActionInsertColumn() {
switch ( model.getTableFormat() ) {
case LIMITED_ENTRY:
return new LimitedEntryActionInsertFactCol52();
default:
return new ActionInsertFactCol52();
}
}
private ActionSetFieldCol52 makeNewActionSetColumn() {
switch ( model.getTableFormat() ) {
case LIMITED_ENTRY:
return new LimitedEntryActionSetFieldCol52();
default:
return new ActionSetFieldCol52();
}
}
private ActionRetractFactCol52 makeNewActionRetractFact() {
switch ( model.getTableFormat() ) {
case LIMITED_ENTRY:
LimitedEntryActionRetractFactCol52 ler = new LimitedEntryActionRetractFactCol52();
ler.setValue( new DTCellValue52( "" ) );
return ler;
default:
return new ActionRetractFactCol52();
}
}
private ActionWorkItemCol52 makeNewActionWorkItem() {
//WorkItems are defined within the column and always boolean (i.e. Limited Entry) in the table
return new ActionWorkItemCol52();
}
private ActionWorkItemSetFieldCol52 makeNewActionWorkItemSetField() {
//Actions setting Field Values from Work Item Result Parameters are always boolean (i.e. Limited Entry) in the table
return new ActionWorkItemSetFieldCol52();
}
private ActionWorkItemInsertFactCol52 makeNewActionWorkItemInsertFact() {
//Actions setting Field Values from Work Item Result Parameters are always boolean (i.e. Limited Entry) in the table
return new ActionWorkItemInsertFactCol52();
}
private BRLActionColumn makeNewActionBRLFragment() {
switch ( model.getTableFormat() ) {
case LIMITED_ENTRY:
return new LimitedEntryBRLActionColumn();
default:
return new BRLActionColumn();
}
}
private BRLConditionColumn makeNewConditionBRLFragment() {
switch ( model.getTableFormat() ) {
case LIMITED_ENTRY:
return new LimitedEntryBRLConditionColumn();
default:
return new BRLConditionColumn();
}
}
} );