public void setLogTable( LogTableInterface logTable ) { this.logTable = logTable; logTableFields.clear(); for ( LogTableField field : logTable.getFields() ) { if ( field.isEnabled() && field.isVisible() ) { logTableFields.add( field ); } } // Recreate table view as log table has changed if ( logDisplayTableView != null ) { Composite tableParent = logDisplayTableView.getParent(); TableView newTable = createTransLogTableView( tableParent ); newTable.moveAbove( logDisplayTableView ); logDisplayTableView.dispose(); tableParent.layout( false ); logDisplayTableView = newTable; } }
public TransHistoryLogTab( CTabFolder tabFolder, LogTableInterface logTable ) { super( tabFolder, SWT.NONE ); setLogTable( logTable ); setText( logTable.getLogTableType() ); spoon.props.setLook( logTableComposite ); setControl( logTableComposite ); sash.setLayoutData( fdSash ); logDisplayTableView = createTransLogTableView( sash );
private void addLogTableTabs() { // Create a nested tab folder in the tab item, on the history composite... // tabFolder = new CTabFolder( transHistoryComposite, SWT.MULTI ); spoon.props.setLook( tabFolder, Props.WIDGET_STYLE_TAB ); FormData fdTabFolder = new FormData(); fdTabFolder.left = new FormAttachment( 0, 0 ); // First one in the left top corner fdTabFolder.top = new FormAttachment( (Control) toolbar.getManagedObject(), 0 ); fdTabFolder.right = new FormAttachment( 100, 0 ); fdTabFolder.bottom = new FormAttachment( 100, 0 ); tabFolder.setLayoutData( fdTabFolder ); models = new TransHistoryLogTab[transMeta.getLogTables().size()]; for ( int i = 0; i < models.length; i++ ) { models[i] = new TransHistoryLogTab( tabFolder, transMeta.getLogTables().get( i ) ); } }