public static synchronized DateConverter getInstance() { if ( INSTANCE == null ) { INSTANCE = new GWTDateConverter(); } return INSTANCE; }
private Widget valueEditor( final ActionFieldValue val ) { DataModelOracle completions = this.getModeller().getSuggestionCompletions(); DropDownData enums = completions.getEnums( this.factType, val.getField(), FieldNatureUtil.toMap( this.model.getFieldValues() ) ); ActionValueEditor actionValueEditor = new ActionValueEditor( val, enums, this.getModeller(), this.getEventBus(), val.getType(), this.readOnly ); actionValueEditor.setOnChangeCommand( new Command() { public void execute() { setModified( true ); } } ); return actionValueEditor; }
DTCellValueUtilities.injectDateConvertor( GWTDateConverter.getInstance() );
private Widget valueEditor( final ActionFieldFunction val ) { DataModelOracle completions = this.getModeller().getSuggestionCompletions(); String type = ""; if ( completions.isGlobalVariable( this.model.getVariable() ) ) { type = completions.getGlobalVariable( this.model.getVariable() ); } else { type = this.getModeller().getModel().getLHSBindingType( this.model.getVariable() ); if ( type == null ) { type = this.getModeller().getModel().getRHSBoundFact( this.model.getVariable() ).getFactType(); } } DropDownData enums = completions.getEnums( type, val.getField(), FieldNatureUtil.toMap( this.model.getFieldValues() ) ); return new MethodParameterValueEditor( val, enums, this.getModeller(), val.getType(), new Command() { public void execute() { setModified( true ); } } ); }
private Widget valueEditor( final ActionFieldValue val ) { DataModelOracle completions = this.getModeller().getSuggestionCompletions(); String type = ""; if ( completions.isGlobalVariable( this.model.getVariable() ) ) { type = completions.getGlobalVariable( this.model.getVariable() ); } else { type = this.getModeller().getModel().getLHSBindingType( this.model.getVariable() ); /* * to take in account if the using a rhs bound variable */ if ( type == null && !this.readOnly ) { type = this.getModeller().getModel().getRHSBoundFact( this.model.getVariable() ).getFactType(); } } DropDownData enums = completions.getEnums( type, val.getField(), FieldNatureUtil.toMap( this.model.getFieldValues() ) ); ActionValueEditor actionValueEditor = new ActionValueEditor( val, enums, this.getModeller(), this.getEventBus(), val.getType(), this.readOnly ); actionValueEditor.setOnChangeCommand( new Command() { public void execute() { setModified( true ); } } ); return actionValueEditor; }