v.getControl().setLayoutData( gd );
v.setContentProvider( ArrayContentProvider.getInstance() );
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( final Object element ) {
return ( (Splash) element ).getMode().getName();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 10, 100, false ) );
c.getColumn().setText( "Mode" );
}
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( final Object element ) {
return ( (Splash) element ).getHref();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 90 ) );
c.getColumn().setText( "URL" );
}
tableContainer.setLayout( tablelayout );
v.setInput( task.getDeploy().getInfo().getSplash() );
Composite buttonComp = toolkit.createComposite( container );
buttonComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.END, false, false ) );
buttonComp.setLayout( new GridLayout() );
{
Button b = toolkit.createButton( buttonComp, "Add ...", SWT.PUSH );
b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
b.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent e ) {
if ( handleAddSplash() ) {
v.setInput( task.getDeploy().getInfo().getSplash() );
v.setSelection( new StructuredSelection( task.getDeploy().getInfo().getSplash()
.get( task.getDeploy().getInfo().getSplash().size() - 1 ) ) );
}
}
} );
}
{
Button b = toolkit.createButton( buttonComp, "Remove", SWT.PUSH );
b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
b.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent e ) {
Splash value = (Splash) ( (IStructuredSelection) v.getSelection() ).getFirstElement();
if ( value != null ) {
if ( handleRemoveSplash( value ) ) {
v.setInput( getTask().getDeploy().getInfo().getSplash() );
}
}
else {
MessageDialog.openWarning( getSite().getShell(), "Warning", "Please select an entry" );
}
}
} );
}
}
{
toolkit.createLabel( sectionClient, "Webstart Icons:" ).setLayoutData( new GridData( GridData.BEGINNING, GridData.BEGINNING, false, false ) );
Composite container = toolkit.createComposite( sectionClient );
GridLayout gl = new GridLayout( 2, false );
gl.marginBottom = gl.marginHeight = gl.marginLeft = gl.marginRight = gl.marginTop = gl.marginWidth = 0;
container.setLayout( gl );
GridData gdContainer = new GridData( GridData.FILL_HORIZONTAL );
gdContainer.horizontalSpan = COLUMN_COUNT - 1;
container.setLayoutData( gdContainer );
Composite tableContainer = toolkit.createComposite( container );
Table t = toolkit.createTable( tableContainer, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
t.setHeaderVisible( true );
t.setLinesVisible( true );
GridData gdTable = new GridData( GridData.FILL_HORIZONTAL );
gdTable.heightHint = t.getItemHeight() * 5;
tableContainer.setLayoutData( gdTable );
TableColumnLayout tablelayout = new TableColumnLayout();
final TableViewer v = new TableViewer( t );
GridData gd = new GridData( GridData.FILL_HORIZONTAL );
gd.heightHint = t.getItemHeight() * 5;
v.getControl().setLayoutData( gd );
v.setContentProvider( ArrayContentProvider.getInstance() );
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (Icon) element ).getDepth();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 10, 50, false ) );
c.getColumn().setText( "Depth" );
}
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (Icon) element ).getKind().getName();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 10, 100, false ) );
c.getColumn().setText( "Kind" );
}
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (Icon) element ).getWidth();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 10, 50, false ) );
c.getColumn().setText( "Width" );
}
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (Icon) element ).getHeight();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 10, 50, false ) );
c.getColumn().setText( "Height" );
}
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (Icon) element ).getHref();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 60 ) );
c.getColumn().setText( "Url" );
}
tableContainer.setLayout( tablelayout );
v.setInput( task.getDeploy().getInfo().getIcon() );
Composite buttonComp = toolkit.createComposite( container );
buttonComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.END, false, false ) );
buttonComp.setLayout( new GridLayout() );
{
Button b = toolkit.createButton( buttonComp, "Add ...", SWT.PUSH );
b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
b.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent e ) {
if ( handleAddIcon() ) {
v.setInput( task.getDeploy().getInfo().getIcon() );
v.setSelection( new StructuredSelection( task.getDeploy().getInfo().getIcon()
.get( task.getDeploy().getInfo().getIcon().size() - 1 ) ) );
}
}
} );
}
{
Button b = toolkit.createButton( buttonComp, "Remove", SWT.PUSH );
b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
b.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent e ) {
Icon value = (Icon) ( (IStructuredSelection) v.getSelection() ).getFirstElement();
if ( value != null ) {
if ( handleRemoveIcon( value ) ) {
v.setInput( task.getDeploy().getInfo().getIcon() );
}
}
else {
MessageDialog.openWarning( getSite().getShell(), "Warning", "Please select an entry" );
}
}
} );
}
}
{
toolkit.createLabel( sectionClient, "Additional META-INF files:" ).setLayoutData(
new GridData( GridData.BEGINNING, GridData.BEGINNING, false, false ) );
Composite container = toolkit.createComposite( sectionClient );
GridLayout gl = new GridLayout( 2, false );
gl.marginBottom = gl.marginHeight = gl.marginLeft = gl.marginRight = gl.marginTop = gl.marginWidth = 0;
container.setLayout( gl );
GridData gdContainer = new GridData( GridData.FILL_HORIZONTAL );
gdContainer.horizontalSpan = COLUMN_COUNT - 1;
container.setLayoutData( gdContainer );
Composite tableContainer = toolkit.createComposite( container );
Table t = toolkit.createTable( tableContainer, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
t.setHeaderVisible( true );
t.setLinesVisible( true );
GridData gdTable = new GridData( GridData.FILL_HORIZONTAL );
gdTable.heightHint = t.getItemHeight() * 5;
tableContainer.setLayoutData( gdTable );
TableColumnLayout tablelayout = new TableColumnLayout();
final TableViewer v = new TableViewer( t );
GridData gd = new GridData( GridData.FILL_HORIZONTAL );
gd.heightHint = t.getItemHeight() * 5;
v.getControl().setLayoutData( gd );
v.setContentProvider( ArrayContentProvider.getInstance() );
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (KeyValuePair) element ).getKey();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 33 ) );
c.getColumn().setText( "Folder" );
}
{
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (KeyValuePair) element ).getValue();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 67 ) );
c.getColumn().setText( "File" );
}
tableContainer.setLayout( tablelayout );
v.setInput( task.getFiles() );
Composite buttonComp = toolkit.createComposite( container );
buttonComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.END, false, false ) );
buttonComp.setLayout( new GridLayout() );
{
Button b = toolkit.createButton( buttonComp, "Add ...", SWT.PUSH );
b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
b.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent e ) {
if ( handleAddMetaInfFile() ) {
v.setInput( task.getFiles() );
v.setSelection( new StructuredSelection( task.getFiles().get( task.getFiles().size() - 1 ) ) );
}
}
} );
}
{
Button b = toolkit.createButton( buttonComp, "Remove", SWT.PUSH );
b.setLayoutData( new GridData( GridData.FILL, GridData.BEGINNING, false, false ) );
b.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( final SelectionEvent e ) {
KeyValuePair value = (KeyValuePair) ( (IStructuredSelection) v.getSelection() ).getFirstElement();
if ( value != null ) {
if ( handleRemoveMetaInfFile( value ) ) {
v.setInput( task.getFiles() );
}
}
else {
MessageDialog.openWarning( getSite().getShell(), "Warning", "Please select an entry" );
}
}
} );
}
}
{
toolkit.createLabel( sectionClient, "Fonts:" ).setLayoutData( new GridData( GridData.BEGINNING, GridData.BEGINNING, false, false ) );
Composite container = toolkit.createComposite( sectionClient );
GridLayout gl = new GridLayout( 2, false );
gl.marginBottom = gl.marginHeight = gl.marginLeft = gl.marginRight = gl.marginTop = gl.marginWidth = 0;
container.setLayout( gl );
GridData gdContainer = new GridData( GridData.FILL_HORIZONTAL );
gdContainer.horizontalSpan = COLUMN_COUNT - 1;
container.setLayoutData( gdContainer );
Composite tableContainer = toolkit.createComposite( container );
Table t = toolkit.createTable( tableContainer, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER );
t.setHeaderVisible( true );
t.setLinesVisible( true );
GridData gdTable = new GridData( GridData.FILL_HORIZONTAL );
gdTable.heightHint = t.getItemHeight() * 5;
tableContainer.setLayoutData( gdTable );
TableColumnLayout tablelayout = new TableColumnLayout();
final TableViewer v = new TableViewer( t );
GridData gd = new GridData( GridData.FILL_HORIZONTAL );
gd.heightHint = t.getItemHeight() * 5;
v.getControl().setLayoutData( gd );
final ArrayContentProvider cp = new ArrayContentProvider();
v.setContentProvider( cp );
{
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ParametersPackage.Literals.KEY_VALUE_PAIR__KEY );
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
TableColumn tc = c.getColumn();
tc.setText( "Font name" );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (KeyValuePair) element ).getKey();
}
} );
tablelayout.setColumnData( c.getColumn(), new ColumnWeightData( 33 ) );
}
{
IEMFValueProperty prop = EMFEditProperties.value( editingDomain, ParametersPackage.Literals.KEY_VALUE_PAIR__VALUE );
TableViewerColumn c = new TableViewerColumn( v, SWT.NONE );
TableColumn tc = c.getColumn();
tc.setText( "File" );
c.setLabelProvider( new ColumnLabelProvider() {
@Override
public String getText( Object element ) {
return ( (KeyValuePair) element ).getValue();
}
} );