doImports( t );
HorizontalPanel importCols = new HorizontalPanel();
importCols.add( importList );
VerticalPanel importActions = new VerticalPanel();
if ( isHistoricalReadOnly ) {
ImageButton newItemButton = new ImageButton( images.newItem(),
images.newItemDisabled() );
newItemButton.setEnabled( false );
importActions.add( newItemButton );
ImageButton trashButton = new ImageButton( images.trash(),
images.trashDisabled() );
trashButton.setEnabled( false );
importActions.add( trashButton );
} else {
ImageButton newItemButton = new ImageButton( images.newItem(),
images.newItemDisabled() ) {
{
addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
showTypeQuestion( (Widget) event.getSource(),
t,
false,
constants.FactTypesJarTip() );
}
} );
}
};
importActions.add( newItemButton );
ImageButton trashButton = new ImageButton( images.trash(),
images.trashDisabled() ) {
{
addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
if ( Window.confirm( constants.AreYouSureYouWantToRemoveThisFactType() ) ) {
int i = importList.getSelectedIndex();
if ( i >= 0 ) {
importList.removeItem( i );
t.imports.remove( i );
updateHeader( t );
}
}
}
} );
}
};
importActions.add( trashButton );
}
importCols.add( importActions );
imports.add( importCols );
VerticalPanel globals = new VerticalPanel();
globals.add( new Label( constants.Globals() ) );
globalList = new ListBox( true );
doGlobals( t );
HorizontalPanel globalCols = new HorizontalPanel();
globalCols.add( globalList );
VerticalPanel globalActions = new VerticalPanel();
if ( isHistoricalReadOnly ) {
ImageButton newItemButton = new ImageButton( images.newItem(),
images.newItemDisabled() );
newItemButton.setEnabled( false );
globalActions.add( newItemButton );
ImageButton trashButton = new ImageButton( images.trash(),
images.trashDisabled() );
trashButton.setEnabled( false );
globalActions.add( trashButton );
} else {
ImageButton newItemButton = new ImageButton( images.newItem(),
images.newItemDisabled() ) {
{
addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
showTypeQuestion( (Widget) event.getSource(),
t,
true,
constants.GlobalTypesAreClassesFromJarFilesThatHaveBeenUploadedToTheCurrentPackage() );
}
} );
}
};
globalActions.add( newItemButton );
ImageButton trashButton = new ImageButton( images.trash(),
images.trashDisabled() ) {
{
addClickHandler( new ClickHandler() {
public void onClick(ClickEvent event) {
if ( Window.confirm( constants.AreYouSureYouWantToRemoveThisGlobal() ) ) {