@Test public void convertRulePriorityColumn() throws Exception { final MetadataCol52 metadataCol = new MetadataCol52(); metadataCol.setMetadata( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME ); final GridColumn<?> column = metaDataColumnConverter.convertColumn( metadataCol, mock( GuidedDecisionTablePresenter.Access.class ), mock( GuidedDecisionTableView.class ) ); assertTrue( column instanceof PriorityListUiColumn ); }
@Override public GridColumn<?> convertColumn( final BaseColumn column, final GuidedDecisionTablePresenter.Access access, final GuidedDecisionTableView gridWidget ) { final MetadataCol52 metadataCol = (MetadataCol52) column; if ( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME.equals( metadataCol.getMetadata() ) ) { return new PriorityListUiColumn( makePriorityHeaderMetaData(), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH + 20 ), access, new ListBoxStringSingletonDOMElementFactory( gridPanel, gridLayer, gridWidget )); } else { return newStringColumn( makeHeaderMetaData( column ), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH ), true, !column.isHideColumn(), access, gridWidget ); } }
MetaDataColumnConverter extends BaseColumnConverterImpl { @Override public GridColumn<?> convertColumn( final BaseColumn column, final GuidedDecisionTablePresenter.Access access, final GuidedDecisionTableView gridWidget ) { final MetadataCol52 metadataCol = (MetadataCol52) column; if ( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME.equals( metadataCol.getMetadata() ) ) { return new PriorityListUiColumn( makePriorityHeaderMetaData(), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH + 20 ), access, new ListBoxStringSingletonDOMElementFactory( gridPanel, gridLayer, gridWidget )); } else { return newStringColumn( makeHeaderMetaData( column ), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH ), true, !column.isHideColumn(), access, gridWidget ); } } }
MetaDataColumnConverter extends BaseColumnConverterImpl { @Override public GridColumn<?> convertColumn( final BaseColumn column, final GuidedDecisionTablePresenter.Access access, final GuidedDecisionTableView gridWidget ) { final MetadataCol52 metadataCol = (MetadataCol52) column; if ( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME.equals( metadataCol.getMetadata() ) ) { return new PriorityListUiColumn( makePriorityHeaderMetaData(), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH + 20 ), access, new ListBoxStringSingletonDOMElementFactory( gridPanel, gridLayer, gridWidget )); } else { return newStringColumn( makeHeaderMetaData( column ), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH ), true, !column.isHideColumn(), access, gridWidget ); } }  }
MetaDataColumnConverter extends BaseColumnConverterImpl { @Override public GridColumn<?> convertColumn( final BaseColumn column, final GuidedDecisionTablePresenter.Access access, final GuidedDecisionTableView gridWidget ) { final MetadataCol52 metadataCol = (MetadataCol52) column; if ( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME.equals( metadataCol.getMetadata() ) ) { return new PriorityListUiColumn( makePriorityHeaderMetaData(), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH + 20 ), access, new ListBoxStringSingletonDOMElementFactory( gridPanel, gridLayer, gridWidget )); } else { return newStringColumn( makeHeaderMetaData( column ), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH ), true, !column.isHideColumn(), access, gridWidget ); } }  @Override boolean handles( final BaseColumn column ); @Override GridColumn<?> convertColumn( final BaseColumn column,
                                        final GuidedDecisionTablePresenter.Access access,
                                        final GuidedDecisionTableView gridWidget ); @Override List<GridColumn.HeaderMetaData> makeHeaderMetaData( final BaseColumn column ); }
MetaDataColumnConverter extends BaseColumnConverterImpl { @Override public GridColumn<?> convertColumn( final BaseColumn column, final GuidedDecisionTablePresenter.Access access, final GuidedDecisionTableView gridWidget ) { final MetadataCol52 metadataCol = (MetadataCol52) column; if ( GuidedDecisionTable52.HitPolicy.RESOLVED_HIT_METADATA_NAME.equals( metadataCol.getMetadata() ) ) { return new PriorityListUiColumn( makePriorityHeaderMetaData(), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH + 20 ), access, new ListBoxStringSingletonDOMElementFactory( gridPanel, gridLayer, gridWidget )); } else { return newStringColumn( makeHeaderMetaData( column ), Math.max( column.getWidth(), DEFAULT_COLUMN_WIDTH ), true, !column.isHideColumn(), access, gridWidget ); } }  @Override boolean handles( final BaseColumn column ); @Override GridColumn<?> convertColumn( final BaseColumn column,
                                        final GuidedDecisionTablePresenter.Access access,
                                        final GuidedDecisionTableView gridWidget ); @Override List<GridColumn.HeaderMetaData> makeHeaderMetaData( final BaseColumn column );  }