|
|
|
@ -186,9 +186,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
private Group rbd_grp = null;
|
|
|
|
|
|
|
|
|
|
private Text rbd_name_txt = null;
|
|
|
|
|
|
|
|
|
|
private Label rbd_name_lbl = null;
|
|
|
|
|
private String rbd_name_txt = null;
|
|
|
|
|
|
|
|
|
|
private Combo disp_type_combo = null;
|
|
|
|
|
|
|
|
|
@ -240,23 +238,23 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
private MenuManager areaMenuMngr = null;
|
|
|
|
|
|
|
|
|
|
private Composite geo_area_info_comp = null; // only one of these visible at
|
|
|
|
|
//private Composite geo_area_info_comp = null; // only one of these visible at
|
|
|
|
|
// a time
|
|
|
|
|
|
|
|
|
|
private Composite rsc_area_opts_comp = null; // depending on if a satellite
|
|
|
|
|
//private Composite rsc_area_opts_comp = null; // depending on if a satellite
|
|
|
|
|
// area is selected
|
|
|
|
|
|
|
|
|
|
private Text proj_info_txt = null; // view-only projection and map center
|
|
|
|
|
//private Text proj_info_txt = null; // view-only projection and map center
|
|
|
|
|
// info
|
|
|
|
|
|
|
|
|
|
private Text map_center_txt = null; // view-only projection and map center
|
|
|
|
|
//private Text map_center_txt = null; // view-only projection and map center
|
|
|
|
|
// info
|
|
|
|
|
|
|
|
|
|
private Button fit_to_screen_btn = null;
|
|
|
|
|
//private Button fit_to_screen_btn = null;
|
|
|
|
|
|
|
|
|
|
private Button size_of_image_btn = null;
|
|
|
|
|
//private Button size_of_image_btn = null;
|
|
|
|
|
|
|
|
|
|
private Button custom_area_btn = null;
|
|
|
|
|
//private Button custom_area_btn = null;
|
|
|
|
|
|
|
|
|
|
private Group pane_layout_grp = null;
|
|
|
|
|
|
|
|
|
@ -271,9 +269,9 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
private Button clr_pane_btn = null;
|
|
|
|
|
|
|
|
|
|
private Label import_lbl = null;
|
|
|
|
|
|
|
|
|
|
private Combo import_rbd_combo = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Button import_rbd_btn = null;
|
|
|
|
|
|
|
|
|
|
private Button load_rbd_btn = null;
|
|
|
|
|
|
|
|
|
|
private Button load_and_close_btn = null;
|
|
|
|
@ -296,15 +294,15 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
private String savedSpfName = null;
|
|
|
|
|
|
|
|
|
|
private Point initDlgSize = new Point(750, 860);
|
|
|
|
|
private Point initDlgSize = new Point(850, 860);
|
|
|
|
|
|
|
|
|
|
private int singlePaneDlgWidth = 750;
|
|
|
|
|
private int singlePaneDlgWidth = 850;
|
|
|
|
|
|
|
|
|
|
private int multiPaneDlgWidth = 950;
|
|
|
|
|
private int multiPaneDlgWidth = 1050;
|
|
|
|
|
|
|
|
|
|
private TimelineControl timelineControl = null;
|
|
|
|
|
|
|
|
|
|
private final String ImportFromSPF = "Import Bundle";
|
|
|
|
|
private final String ImportFromSPF = "Import";
|
|
|
|
|
|
|
|
|
|
private Group timeline_grp;
|
|
|
|
|
|
|
|
|
@ -344,8 +342,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
sash_form.setLayoutData(gd);
|
|
|
|
|
sash_form.setSashWidth(10);
|
|
|
|
|
|
|
|
|
|
rbd_grp = new Group( sash_form, SWT.NONE );
|
|
|
|
|
rbd_grp.setText( "" );
|
|
|
|
|
rbd_grp = new Group(sash_form, SWT.SHADOW_NONE);
|
|
|
|
|
//rbd_grp.setText("Create Bundle");
|
|
|
|
|
gd = new GridData();
|
|
|
|
|
gd.grabExcessHorizontalSpace = true;
|
|
|
|
|
gd.grabExcessVerticalSpace = true;
|
|
|
|
@ -516,7 +514,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
import_lbl.setLayoutData(form_data);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
rbd_name_txt = new Text(rbd_grp, SWT.SINGLE | SWT.BORDER);
|
|
|
|
|
rbd_name_txt = "";
|
|
|
|
|
/*
|
|
|
|
|
rbd_name_txt = new Text(rbd_grp, SWT.SINGLE | SWT.BORDER);
|
|
|
|
|
form_data = new FormData(200, 20);
|
|
|
|
@ -534,8 +532,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Import
|
|
|
|
|
Button import_rbd_btn = new Button( rbd_grp, SWT.PUSH );
|
|
|
|
|
import_rbd_btn.setText(ImportFromSPF);
|
|
|
|
|
import_rbd_btn = new Button( rbd_grp, SWT.PUSH );
|
|
|
|
|
import_rbd_btn.setText("Import");
|
|
|
|
|
FormData form_data = new FormData();
|
|
|
|
|
form_data.width = 120;
|
|
|
|
|
form_data.top = new FormAttachment( 0, 10 );
|
|
|
|
@ -556,11 +554,10 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
NcDisplayType.NTRANS_DISPLAY.getName(),
|
|
|
|
|
NcDisplayType.SOLAR_DISPLAY.getName(),
|
|
|
|
|
NcDisplayType.GRAPH_DISPLAY.getName() });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// AREA
|
|
|
|
|
//createAreaGroup();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
ToolBar areaTBar = new ToolBar(rbd_grp, SWT.SHADOW_OUT|SWT.HORIZONTAL|SWT.RIGHT|SWT.WRAP);
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.left = new FormAttachment( disp_type_combo, 10, SWT.RIGHT );
|
|
|
|
@ -607,11 +604,14 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
areaCtxMenu.setVisible(true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// 2 Composites. 1 for when a predefined area is selected which will show the
|
|
|
|
|
// projection and map center. And 1 for when a satellite resource is selected which
|
|
|
|
|
// will let the user select either FitToScreen or SizeOfImage
|
|
|
|
|
//
|
|
|
|
|
/*
|
|
|
|
|
geo_area_info_comp = new Composite( rbd_grp, SWT.NONE );
|
|
|
|
|
geo_area_info_comp.setLayout( new FormLayout() );
|
|
|
|
|
rsc_area_opts_comp = new Composite( rbd_grp, SWT.NONE );
|
|
|
|
@ -620,19 +620,25 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
geo_area_info_comp.setVisible( true );
|
|
|
|
|
rsc_area_opts_comp.setVisible( false );
|
|
|
|
|
|
|
|
|
|
disp_type_lbl = new Label(rbd_grp, SWT.None);
|
|
|
|
|
disp_type_lbl.setText("RBD Type");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.left = new FormAttachment(disp_type_combo, 0, SWT.LEFT);
|
|
|
|
|
form_data.bottom = new FormAttachment(disp_type_combo, -3, SWT.TOP);
|
|
|
|
|
disp_type_lbl.setLayoutData(form_data);
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.top = new FormAttachment( areaTBar, 15, SWT.BOTTOM );
|
|
|
|
|
form_data.right = new FormAttachment( 100, -10 );
|
|
|
|
|
|
|
|
|
|
// both overlap each other since only one visible at a time
|
|
|
|
|
geo_area_info_comp.setLayoutData( form_data );
|
|
|
|
|
|
|
|
|
|
form_data.top = new FormAttachment( areaTBar, 30, SWT.BOTTOM );
|
|
|
|
|
rsc_area_opts_comp.setLayoutData( form_data );
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Multi-Pane Checkbox
|
|
|
|
|
multi_pane_tog = new Button(rbd_grp, SWT.CHECK);
|
|
|
|
|
multi_pane_tog.setText("Multi-Pane");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.top = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( areaTBar, 10, SWT.RIGHT );
|
|
|
|
|
form_data.left = new FormAttachment( disp_type_combo, 10, SWT.RIGHT );
|
|
|
|
|
multi_pane_tog.setLayoutData(form_data);
|
|
|
|
|
|
|
|
|
|
auto_update_btn = new Button(rbd_grp, SWT.CHECK);
|
|
|
|
@ -643,15 +649,26 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
auto_update_btn.setLayoutData(form_data);
|
|
|
|
|
auto_update_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
geo_sync_panes = new Button(rbd_grp, SWT.CHECK);
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
geo_sync_panes.setText("Geo-Sync Panes");
|
|
|
|
|
form_data.top = new FormAttachment(auto_update_btn, 10, SWT.BOTTOM);
|
|
|
|
|
form_data.left = new FormAttachment(auto_update_btn, 0, SWT.LEFT);
|
|
|
|
|
geo_sync_panes.setLayoutData(form_data);
|
|
|
|
|
*/
|
|
|
|
|
//createAreaGroup();
|
|
|
|
|
|
|
|
|
|
// create all the widgets used to show and edit the Selected Resources
|
|
|
|
|
seld_rscs_grp = createSeldRscsGroup();
|
|
|
|
|
|
|
|
|
|
createPaneLayoutGroup();
|
|
|
|
|
|
|
|
|
|
//createGroupGrp();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void createAreaGroup() {
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
geo_area_grp = new Group(rbd_grp, SWT.SHADOW_NONE);
|
|
|
|
|
geo_area_grp.setText("Area");
|
|
|
|
|
geo_area_grp.setLayout(new FormLayout());
|
|
|
|
@ -662,9 +679,9 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
form_data.left = new FormAttachment(0, 10);
|
|
|
|
|
form_data.width = 150;
|
|
|
|
|
geo_area_grp.setLayoutData(form_data);
|
|
|
|
|
*/
|
|
|
|
|
ToolBar areaTBar = new ToolBar(rbd_grp, SWT.SHADOW_OUT|SWT.HORIZONTAL|SWT.RIGHT|SWT.WRAP);
|
|
|
|
|
FormData form_data = new FormData();
|
|
|
|
|
|
|
|
|
|
ToolBar areaTBar = new ToolBar(geo_area_grp, SWT.SHADOW_OUT|SWT.HORIZONTAL|SWT.RIGHT|SWT.WRAP);
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.left = new FormAttachment( disp_type_combo, 10, SWT.RIGHT );
|
|
|
|
|
form_data.top = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.width = 100;
|
|
|
|
@ -717,6 +734,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// selecte which
|
|
|
|
|
// will let the user select either FitToScreen or SizeOfImage
|
|
|
|
|
//
|
|
|
|
|
/*
|
|
|
|
|
geo_area_info_comp = new Composite(geo_area_grp, SWT.NONE);
|
|
|
|
|
geo_area_info_comp.setLayout(new FormLayout());
|
|
|
|
|
rsc_area_opts_comp = new Composite(geo_area_grp, SWT.NONE);
|
|
|
|
@ -736,15 +754,16 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
form_data.top = new FormAttachment(areaTBar, 30, SWT.BOTTOM);
|
|
|
|
|
rsc_area_opts_comp.setLayoutData(form_data);
|
|
|
|
|
|
|
|
|
|
fit_to_screen_btn = new Button(rsc_area_opts_comp, SWT.RADIO);
|
|
|
|
|
fit_to_screen_btn.setText("Fit To Screen");
|
|
|
|
|
//fit_to_screen_btn = new Button( rsc_area_opts_comp, SWT.RADIO );
|
|
|
|
|
//fit_to_screen_btn.setText( "Fit To Screen");
|
|
|
|
|
|
|
|
|
|
size_of_image_btn = new Button(rsc_area_opts_comp, SWT.RADIO);
|
|
|
|
|
size_of_image_btn.setText("Size Of Image");
|
|
|
|
|
//size_of_image_btn = new Button( rsc_area_opts_comp, SWT.RADIO );
|
|
|
|
|
//size_of_image_btn.setText("Size Of Image");
|
|
|
|
|
|
|
|
|
|
fit_to_screen_btn.setSelection(true); // radio behaviour
|
|
|
|
|
size_of_image_btn.setSelection(false);
|
|
|
|
|
//fit_to_screen_btn.setSelection( true ); // radio behaviour
|
|
|
|
|
//size_of_image_btn.setSelection( false );
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
Label proj_lbl = new Label(geo_area_info_comp, SWT.None);
|
|
|
|
|
proj_lbl.setText("Projection");
|
|
|
|
@ -805,18 +824,20 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
//
|
|
|
|
|
private Group createSeldRscsGroup() {
|
|
|
|
|
Group seld_rscs_grp = new Group(rbd_grp, SWT.SHADOW_NONE);
|
|
|
|
|
seld_rscs_grp.setText("Selected Resources");
|
|
|
|
|
seld_rscs_grp.setText(rbd_name_txt);
|
|
|
|
|
seld_rscs_grp.setLayout(new FormLayout());
|
|
|
|
|
FormData form_data = new FormData();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NOTE : This is reset in updateGUIforMultipane()
|
|
|
|
|
// NOTE : so we don't even need it
|
|
|
|
|
// form_data.left = new FormAttachment( 30, 2 );
|
|
|
|
|
// form_data.top = new FormAttachment( rbd_name_txt, 25, SWT.BOTTOM );
|
|
|
|
|
form_data.top = new FormAttachment( multi_pane_tog, 15, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10, SWT.RIGHT );
|
|
|
|
|
form_data.top = new FormAttachment( multi_pane_tog, 15, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.right = new FormAttachment( 100, -10 );
|
|
|
|
|
form_data.bottom = new FormAttachment(100, 0);
|
|
|
|
|
seld_rscs_grp.setLayoutData(form_data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This is multi-select to make Deleting resources easier.
|
|
|
|
|
seld_rscs_lviewer = new ListViewer(seld_rscs_grp, SWT.MULTI
|
|
|
|
@ -829,38 +850,34 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
seld_rscs_lviewer.getList().setLayoutData(form_data);
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
edit_rsc_btn = new Button(seld_rscs_grp, SWT.PUSH);
|
|
|
|
|
edit_rsc_btn.setText(" Edit ");
|
|
|
|
|
/*
|
|
|
|
|
replace_rsc_btn = new Button( seld_rscs_grp, SWT.PUSH );
|
|
|
|
|
replace_rsc_btn.setText("Replace");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 90;
|
|
|
|
|
form_data.bottom = new FormAttachment(100, -10);
|
|
|
|
|
|
|
|
|
|
// if( enableReplaceBtnFromCreateRbd ) {
|
|
|
|
|
// form_data.left = new FormAttachment( 42, -45 );
|
|
|
|
|
// }
|
|
|
|
|
// else {
|
|
|
|
|
form_data.left = new FormAttachment(40, 20);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
edit_rsc_btn.setLayoutData(form_data);
|
|
|
|
|
edit_rsc_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
sel_rsc_btn = new Button(seld_rscs_grp, SWT.PUSH);
|
|
|
|
|
sel_rsc_btn.setText(" New ... ");
|
|
|
|
|
form_data.left = new FormAttachment( edit_rsc_btn, 30, SWT.RIGHT );
|
|
|
|
|
replace_rsc_btn.setLayoutData( form_data );
|
|
|
|
|
replace_rsc_btn.setEnabled(false);
|
|
|
|
|
replace_rsc_btn.setVisible( false ); //enableReplaceBtnFromCreateRbd );
|
|
|
|
|
*/
|
|
|
|
|
// Add
|
|
|
|
|
sel_rsc_btn = new Button( seld_rscs_grp, SWT.PUSH );
|
|
|
|
|
sel_rsc_btn.setText("Add");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 75;
|
|
|
|
|
form_data.top = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
sel_rsc_btn.setLayoutData(form_data);
|
|
|
|
|
|
|
|
|
|
// Edit
|
|
|
|
|
edit_rsc_btn = new Button( seld_rscs_grp, SWT.PUSH );
|
|
|
|
|
edit_rsc_btn.setText("Edit");
|
|
|
|
|
edit_rsc_btn.setText("Edit");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 75;
|
|
|
|
|
form_data.top = new FormAttachment( sel_rsc_btn, 8, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
edit_rsc_btn.setLayoutData( form_data );
|
|
|
|
|
form_data.width = 75;
|
|
|
|
|
form_data.top = new FormAttachment( sel_rsc_btn, 8, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
edit_rsc_btn.setLayoutData( form_data );
|
|
|
|
|
edit_rsc_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
// Remove
|
|
|
|
@ -869,31 +886,28 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 75;
|
|
|
|
|
form_data.top = new FormAttachment( edit_rsc_btn, 8, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
del_rsc_btn.setLayoutData(form_data);
|
|
|
|
|
del_rsc_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
// Turn Off
|
|
|
|
|
disable_rsc_btn = new Button( seld_rscs_grp, SWT.TOGGLE );
|
|
|
|
|
disable_rsc_btn = new Button(seld_rscs_grp, SWT.TOGGLE);
|
|
|
|
|
disable_rsc_btn.setText("Turn Off");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 75;
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.top = new FormAttachment( del_rsc_btn, 8, SWT.BOTTOM );
|
|
|
|
|
disable_rsc_btn.setLayoutData(form_data);
|
|
|
|
|
|
|
|
|
|
// Move Down
|
|
|
|
|
Button move_down_btn = new Button( seld_rscs_grp, SWT.ARROW | SWT.DOWN );
|
|
|
|
|
Button move_down_btn = new Button(seld_rscs_grp, SWT.ARROW | SWT.DOWN);
|
|
|
|
|
move_down_btn.setToolTipText("Move Down");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 35;
|
|
|
|
|
form_data.top = new FormAttachment( disable_rsc_btn, 8, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
move_down_btn.setLayoutData(form_data);
|
|
|
|
|
move_down_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
// Move Up
|
|
|
|
|
Button move_up_btn = new Button( seld_rscs_grp, SWT.ARROW | SWT.UP );
|
|
|
|
|
Button move_up_btn = new Button(seld_rscs_grp, SWT.ARROW | SWT.UP);
|
|
|
|
|
move_up_btn.setToolTipText("Move Up");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 35;
|
|
|
|
@ -902,16 +916,16 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
move_up_btn.setLayoutData(form_data);
|
|
|
|
|
move_up_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
Button edit_span_btn = new Button( seld_rscs_grp, SWT.PUSH );
|
|
|
|
|
edit_span_btn.setText("Bin");
|
|
|
|
|
Button edit_span_btn = new Button(seld_rscs_grp, SWT.PUSH);
|
|
|
|
|
edit_span_btn.setText("Bin");
|
|
|
|
|
form_data = new FormData();
|
|
|
|
|
form_data.width = 75;
|
|
|
|
|
form_data.top = new FormAttachment( move_down_btn, 8, SWT.BOTTOM );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
form_data.left = new FormAttachment( 0, 10 );
|
|
|
|
|
edit_span_btn.setLayoutData(form_data);
|
|
|
|
|
edit_span_btn.setEnabled(false);
|
|
|
|
|
|
|
|
|
|
// seld_rscs_grp.pack(true);
|
|
|
|
|
seld_rscs_grp.pack(true);
|
|
|
|
|
|
|
|
|
|
return seld_rscs_grp;
|
|
|
|
|
}
|
|
|
|
@ -1477,7 +1491,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
num_rows_lbl.setLayoutData(fd);
|
|
|
|
|
|
|
|
|
|
Label num_cols_lbl = new Label(pane_layout_grp, SWT.NONE);
|
|
|
|
|
num_cols_lbl.setText( "Columns");
|
|
|
|
|
num_cols_lbl.setText( "Cols");
|
|
|
|
|
fd = new FormData();
|
|
|
|
|
fd.right = new FormAttachment(num_rows_cols_comp, -5, SWT.LEFT);
|
|
|
|
|
fd.top = new FormAttachment(num_rows_lbl, 15, SWT.BOTTOM);
|
|
|
|
@ -1508,8 +1522,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
fd.right = new FormAttachment(100, -15);
|
|
|
|
|
pane_sel_comp.setLayoutData(fd);
|
|
|
|
|
|
|
|
|
|
pane_sel_btns = new Button[rbdMngr.getMaxPaneLayout().getRows()][rbdMngr
|
|
|
|
|
.getMaxPaneLayout().getColumns()];
|
|
|
|
|
pane_sel_btns = new Button[rbdMngr.getMaxPaneLayout().getRows()]
|
|
|
|
|
[rbdMngr.getMaxPaneLayout().getColumns()];
|
|
|
|
|
|
|
|
|
|
int numPanes = rbdMngr.getMaxPaneLayout().getNumberOfPanes();
|
|
|
|
|
for (int p = 0; p < numPanes; p++) {
|
|
|
|
@ -1687,6 +1701,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
// may be invisible, if implementing the Replace on the Select Resource
|
|
|
|
|
// Dialog
|
|
|
|
|
/*
|
|
|
|
|
replace_rsc_btn.addSelectionListener(new SelectionAdapter() {
|
|
|
|
|
public void widgetSelected(SelectionEvent e) {
|
|
|
|
|
if (!rscSelDlg.isOpen()) {
|
|
|
|
@ -1707,7 +1722,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
rscSelDlg.addResourceSelectionListener(new IResourceSelectedListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void resourceSelected(ResourceName rscName, boolean replace,
|
|
|
|
@ -1791,11 +1806,10 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
StructuredSelection grp = (StructuredSelection) groupListViewer
|
|
|
|
|
StructuredSelection sel_elems = (StructuredSelection) seld_rscs_lviewer
|
|
|
|
|
.getSelection();
|
|
|
|
|
|
|
|
|
|
ResourceSelection sel = (ResourceSelection) grp
|
|
|
|
|
ResourceSelection sel = (ResourceSelection) sel_elems
|
|
|
|
|
.getFirstElement();
|
|
|
|
|
|
|
|
|
|
if (sel != null
|
|
|
|
@ -1863,7 +1877,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
/*
|
|
|
|
|
/*
|
|
|
|
|
size_of_image_btn.addSelectionListener(new SelectionAdapter() {
|
|
|
|
|
public void widgetSelected(SelectionEvent e) {
|
|
|
|
|
rbdMngr.setZoomLevel((size_of_image_btn.getSelection() ? // -1.0
|
|
|
|
@ -1924,7 +1938,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
.getProviderName() + "\n\n"
|
|
|
|
|
+ "Continue?", MessageDialog.QUESTION,
|
|
|
|
|
new String[] { "Yes", "No" }, 0);
|
|
|
|
|
confirmDlg.open();
|
|
|
|
|
//confirmDlg.open();
|
|
|
|
|
|
|
|
|
|
if (confirmDlg.getReturnCode() != MessageDialog.OK) {
|
|
|
|
|
geo_sync_panes.setSelection(false);
|
|
|
|
@ -1947,7 +1961,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
*/
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// only 1 should be selected or this button should be greyed out
|
|
|
|
|
edit_rsc_btn.addSelectionListener(new SelectionAdapter() {
|
|
|
|
@ -2038,12 +2052,12 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
import_rbd_combo.addSelectionListener(new SelectionAdapter() {
|
|
|
|
|
import_rbd_btn.addSelectionListener(new SelectionAdapter() {
|
|
|
|
|
public void widgetSelected(SelectionEvent ev) {
|
|
|
|
|
importRBD(import_rbd_combo.getText());
|
|
|
|
|
importRBD(import_rbd_btn.getText());
|
|
|
|
|
AbstractEditor seldEditor = NcDisplayMngr
|
|
|
|
|
.findDisplayByID(NcDisplayName
|
|
|
|
|
.parseNcDisplayNameString(import_rbd_combo
|
|
|
|
|
.parseNcDisplayNameString(import_rbd_btn
|
|
|
|
|
.getText()));
|
|
|
|
|
|
|
|
|
|
if (seldEditor != null) {
|
|
|
|
@ -2062,7 +2076,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// ....update...with new Eclipse this seems to be working; ie.
|
|
|
|
|
// triggering a selection when
|
|
|
|
|
// combo is clicked on but selection isn't changed.
|
|
|
|
|
import_rbd_combo.addFocusListener(new FocusListener() {
|
|
|
|
|
import_rbd_btn.addFocusListener(new FocusListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void focusGained(FocusEvent e) {
|
|
|
|
|
// System.out.println("focusGained: ");
|
|
|
|
@ -2073,20 +2087,20 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// System.out.println("focusLost: " );
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
import_rbd_combo.addListener(SWT.MouseDown, new Listener() { // and
|
|
|
|
|
import_rbd_btn.addListener(SWT.MouseDown, new Listener() { // and
|
|
|
|
|
// SWT.MouseUp
|
|
|
|
|
@Override
|
|
|
|
|
public void handleEvent(Event event) {
|
|
|
|
|
// System.out.println("SWT.MouseDown: " );
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
import_rbd_combo.addListener(SWT.Activate, new Listener() {
|
|
|
|
|
import_rbd_btn.addListener(SWT.Activate, new Listener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void handleEvent(Event event) {
|
|
|
|
|
updateImportCombo();
|
|
|
|
|
//updateImportCombo();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
import_rbd_combo.addListener(SWT.Deactivate, new Listener() {
|
|
|
|
|
import_rbd_btn.addListener(SWT.Deactivate, new Listener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void handleEvent(Event event) {
|
|
|
|
|
// System.out.println("SWT.Deactivate: " );
|
|
|
|
@ -2129,7 +2143,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
importPane(impRbd, impRbd.getSelectedPaneId());
|
|
|
|
|
} catch (VizException e) {
|
|
|
|
|
MessageDialog errDlg = new MessageDialog(shell,
|
|
|
|
|
"Error", null, "Error Importing Rbd, "
|
|
|
|
|
"Error", null, "Error Importing Bundle, "
|
|
|
|
|
+ impRbd.getRbdName() + ".\n"
|
|
|
|
|
+ e.getMessage(), MessageDialog.ERROR,
|
|
|
|
|
new String[] { "OK" }, 0);
|
|
|
|
@ -2145,14 +2159,14 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
//
|
|
|
|
|
public void initWidgets() {
|
|
|
|
|
|
|
|
|
|
rbd_name_txt.setText("");
|
|
|
|
|
rbd_name_txt = "";
|
|
|
|
|
|
|
|
|
|
updateAreaGUI();// should be the default area
|
|
|
|
|
|
|
|
|
|
shell.setSize(initDlgSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateGUIforMultipane(rbdMngr.isMultiPane());
|
|
|
|
|
|
|
|
|
|
shell.setSize(initDlgSize);
|
|
|
|
|
timelineControl.clearTimeline();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2165,7 +2179,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// rbd_name_txt.setBackground( rbd_name_txt.getParent().getBackground()
|
|
|
|
|
// );
|
|
|
|
|
import_lbl.setVisible(false);
|
|
|
|
|
import_rbd_combo.setVisible(false);
|
|
|
|
|
//import_lbl.setVisible( true ); // upc_14.2.1
|
|
|
|
|
//import_rbd_btn.setVisible( true ); // upc_14.2.1
|
|
|
|
|
clear_rbd_btn.setVisible(false);
|
|
|
|
|
save_rbd_btn.setVisible(false);
|
|
|
|
|
load_pane_btn.setVisible(false);
|
|
|
|
@ -2190,16 +2205,18 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
FormData fd = (FormData) rbd_name_txt.getLayoutData();
|
|
|
|
|
fd.left = new FormAttachment(20, 0);
|
|
|
|
|
rbd_name_txt.setLayoutData(fd);
|
|
|
|
|
/*
|
|
|
|
|
FormData fd = (FormData) rbd_name_txt.getLayoutData();
|
|
|
|
|
fd.left = new FormAttachment(20, 0);
|
|
|
|
|
rbd_name_txt.setLayoutData(fd);
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
timelineControl.getParent().setVisible(false);
|
|
|
|
|
sash_form.setWeights(new int[] { 10, 1 });
|
|
|
|
|
shell.setSize(shell.getSize().x - 100, 350);
|
|
|
|
|
shell.pack(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
public void updateImportCombo() {
|
|
|
|
|
// check for possible new Displays that may be imported.
|
|
|
|
|
NcDisplayName seldImport = NcDisplayName
|
|
|
|
@ -2228,12 +2245,14 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
import_rbd_combo.select(import_rbd_combo.getItemCount() - 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// Note: if the text set for the ToolItem doesn't fit on the size of the
|
|
|
|
|
// item then it will become blank and unselectable. Need to make sure this
|
|
|
|
|
// doesn't happen so create a multi-line text string for the tool item and
|
|
|
|
|
// make sure it is wide and high enough to hold the string.
|
|
|
|
|
//
|
|
|
|
|
/*
|
|
|
|
|
public void setAreaTextOnMenuItem(AreaName areaName) {
|
|
|
|
|
seldAreaMenuItem = new AreaMenuItem(areaName);
|
|
|
|
|
|
|
|
|
@ -2241,7 +2260,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// the ToolItem has a width of 136. This will display up to 13
|
|
|
|
|
// characters.
|
|
|
|
|
//
|
|
|
|
|
Point toolBarSize = areaTItm.getParent().getSize(); // current width and
|
|
|
|
|
//Point toolBarSize = areaTItm.getParent().getSize(); // current width and
|
|
|
|
|
// height
|
|
|
|
|
|
|
|
|
|
if (toolBarSize.x == 0) { // gui not initialized yet
|
|
|
|
@ -2356,6 +2375,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
areaTItm.setToolTipText(truncated ? seldAreaMenuItem.getMenuName() : "");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// set the area and update the proj/center field
|
|
|
|
|
// the
|
|
|
|
@ -2363,43 +2383,43 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
PredefinedArea area = rbdMngr.getSelectedArea();
|
|
|
|
|
|
|
|
|
|
setAreaTextOnMenuItem(new AreaName(area.getSource(), area.getAreaName()));
|
|
|
|
|
//setAreaTextOnMenuItem(new AreaName(area.getSource(), area.getAreaName()));
|
|
|
|
|
|
|
|
|
|
geo_area_info_comp.setVisible(false);
|
|
|
|
|
rsc_area_opts_comp.setVisible(false);
|
|
|
|
|
//geo_area_info_comp.setVisible(false);
|
|
|
|
|
//rsc_area_opts_comp.setVisible(false);
|
|
|
|
|
|
|
|
|
|
if (area.getSource().isImagedBased()) {
|
|
|
|
|
|
|
|
|
|
rsc_area_opts_comp.setVisible(true);
|
|
|
|
|
//rsc_area_opts_comp.setVisible(true);
|
|
|
|
|
|
|
|
|
|
if (area.getZoomLevel().equals(
|
|
|
|
|
ZoomLevelStrings.FitToScreen.toString())) {
|
|
|
|
|
fit_to_screen_btn.setSelection(true);
|
|
|
|
|
size_of_image_btn.setSelection(false);
|
|
|
|
|
//fit_to_screen_btn.setSelection(true);
|
|
|
|
|
//size_of_image_btn.setSelection(false);
|
|
|
|
|
} else if (area.getZoomLevel().equals(
|
|
|
|
|
ZoomLevelStrings.SizeOfImage.toString())) {
|
|
|
|
|
fit_to_screen_btn.setSelection(false);
|
|
|
|
|
size_of_image_btn.setSelection(true);
|
|
|
|
|
//fit_to_screen_btn.setSelection(false);
|
|
|
|
|
//size_of_image_btn.setSelection(true);
|
|
|
|
|
} else {
|
|
|
|
|
// / ????
|
|
|
|
|
area.setZoomLevel("1.0");
|
|
|
|
|
fit_to_screen_btn.setSelection(true);
|
|
|
|
|
size_of_image_btn.setSelection(false);
|
|
|
|
|
//fit_to_screen_btn.setSelection(true);
|
|
|
|
|
//size_of_image_btn.setSelection(false);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
geo_area_info_comp.setVisible(true);
|
|
|
|
|
//geo_area_info_comp.setVisible(true);
|
|
|
|
|
|
|
|
|
|
String projStr = rbdMngr.getSelectedArea().getGridGeometry()
|
|
|
|
|
.getCoordinateReferenceSystem().getName().toString();
|
|
|
|
|
|
|
|
|
|
proj_info_txt.setText(projStr);
|
|
|
|
|
proj_info_txt.setToolTipText(projStr);
|
|
|
|
|
//proj_info_txt.setText( projStr );
|
|
|
|
|
//proj_info_txt.setToolTipText( projStr );
|
|
|
|
|
|
|
|
|
|
// use the GEMPAK name if possible.
|
|
|
|
|
for (String gemProj : gempakProjMap.keySet()) {
|
|
|
|
|
|
|
|
|
|
if (gempakProjMap.get(gemProj).equals(projStr)) {
|
|
|
|
|
proj_info_txt.setText(gemProj.toUpperCase());
|
|
|
|
|
//proj_info_txt.setText( gemProj.toUpperCase() );
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2408,10 +2428,10 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
Integer lat = (int) (area.getMapCenter()[1] * 1000.0);
|
|
|
|
|
Integer lon = (int) (area.getMapCenter()[0] * 1000.0);
|
|
|
|
|
|
|
|
|
|
map_center_txt.setText(Double.toString((double) lat / 1000.0)
|
|
|
|
|
+ "/" + Double.toString((double) lon / 1000.0));
|
|
|
|
|
//map_center_txt.setText(Double.toString((double) lat / 1000.0)
|
|
|
|
|
// + "/" + Double.toString((double) lon / 1000.0));
|
|
|
|
|
} else {
|
|
|
|
|
map_center_txt.setText("N/A");
|
|
|
|
|
//map_center_txt.setText("N/A");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2489,7 +2509,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
//
|
|
|
|
|
public void updateDialog() {
|
|
|
|
|
|
|
|
|
|
updateImportCombo();
|
|
|
|
|
//updateImportCombo();
|
|
|
|
|
|
|
|
|
|
// If the gui has not been set with the current rbdMngr then do it now.
|
|
|
|
|
updateGUI();
|
|
|
|
@ -2516,11 +2536,11 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
disp_type_combo.select(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rbd_name_txt.setText(rbdMngr.getRbdName());
|
|
|
|
|
|
|
|
|
|
rbd_name_txt.setSelection(0, rbdMngr.getRbdName().length());
|
|
|
|
|
rbd_name_txt.setFocus();
|
|
|
|
|
rbd_name_txt = rbdMngr.getRbdName();
|
|
|
|
|
|
|
|
|
|
//rbd_name_txt.setSelection(0, rbdMngr.getRbdName().length());
|
|
|
|
|
//rbd_name_txt.setFocus();
|
|
|
|
|
/*
|
|
|
|
|
import_rbd_combo.deselectAll();
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < import_rbd_combo.getItemCount(); i++) {
|
|
|
|
@ -2535,6 +2555,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
if (import_rbd_combo.getSelectionIndex() == -1) {
|
|
|
|
|
import_rbd_combo.select(import_rbd_combo.getItemCount() - 1);
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
updateAreaGUI();
|
|
|
|
|
|
|
|
|
@ -2698,6 +2719,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void removeSelectedResource(ResourceSelection rscSel) {
|
|
|
|
|
/*
|
|
|
|
|
if (groupListViewer.getSelection() == null
|
|
|
|
|
|| groupListViewer.getSelection().isEmpty()
|
|
|
|
|
|| groupListViewer.getTable().getSelection()[0].getText()
|
|
|
|
@ -2707,7 +2729,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
((GroupResourceData) getGroupResourceSelection().getResourceData())
|
|
|
|
|
.getResourceList().remove(rscSel.getResourcePair());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
// remove this from the list of available dominant resources.
|
|
|
|
|
if (rscSel.getResourceData() instanceof AbstractNatlCntrsRequestableResourceData) {
|
|
|
|
|
timelineControl
|
|
|
|
@ -2823,6 +2845,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
List<ResourceSelection> origSeldRscsList = (List<ResourceSelection>) orig_sel_elems
|
|
|
|
|
.toList();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
if (groupListViewer.getSelection().isEmpty()
|
|
|
|
|
|| groupListViewer.getTable().getSelection()[0].getText()
|
|
|
|
|
.equalsIgnoreCase(ungrpStr)) {
|
|
|
|
@ -2834,6 +2857,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
: groupListViewer.getTable().getSelection()[0]
|
|
|
|
|
.getText()));
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
seld_rscs_lviewer.setInput(rbdMngr.getUngroupedResources());
|
|
|
|
|
seld_rscs_lviewer.refresh(true);
|
|
|
|
|
|
|
|
|
|
List<ResourceSelection> newSeldRscsList = new ArrayList<ResourceSelection>();
|
|
|
|
@ -2905,7 +2930,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// name of the RBD
|
|
|
|
|
public void loadRBD(boolean close) {
|
|
|
|
|
|
|
|
|
|
String rbdName = rbd_name_txt.getText().trim();
|
|
|
|
|
String rbdName = rbd_name_txt.trim();
|
|
|
|
|
|
|
|
|
|
if (rbdName == null || rbdName.isEmpty()) {
|
|
|
|
|
rbdName = "Preview";
|
|
|
|
@ -2999,7 +3024,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
if (editor == null) {
|
|
|
|
|
NcDisplayName importDisplayName = NcDisplayName
|
|
|
|
|
.parseNcDisplayNameString(import_rbd_combo.getText());
|
|
|
|
|
.parseNcDisplayNameString(import_rbd_btn.getText());
|
|
|
|
|
|
|
|
|
|
if (importDisplayName.getName().equals(rbdName)) {
|
|
|
|
|
// get by ID since the rbd name doesn't have to be unique
|
|
|
|
@ -3051,8 +3076,12 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
// Assign hot keys to group resources.
|
|
|
|
|
// Set visible for the selected group.
|
|
|
|
|
ResourceSelection rsel = getGroupResourceSelection();
|
|
|
|
|
|
|
|
|
|
//ResourceSelection rsel = getGroupResourceSelection();
|
|
|
|
|
StructuredSelection sel_elems = (StructuredSelection) seld_rscs_lviewer
|
|
|
|
|
.getSelection();
|
|
|
|
|
|
|
|
|
|
ResourceSelection rsel = (ResourceSelection) sel_elems
|
|
|
|
|
.getFirstElement();
|
|
|
|
|
for (AbstractRenderableDisplay rendDisp : rbdBndl.getDisplays()) {
|
|
|
|
|
int funKey = 1;
|
|
|
|
|
for (ResourcePair rp : rendDisp.getDescriptor()
|
|
|
|
@ -3091,8 +3120,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
if (close) {
|
|
|
|
|
shell.dispose();
|
|
|
|
|
} else {
|
|
|
|
|
import_rbd_combo.add(editor.getPartName());
|
|
|
|
|
import_rbd_combo.setText(editor.getPartName());
|
|
|
|
|
//import_rbd_combo.add(editor.getPartName());
|
|
|
|
|
import_rbd_btn.setText(editor.getPartName());
|
|
|
|
|
rbdMngr.setRbdModified(false);
|
|
|
|
|
importRBD(editor.getPartName());
|
|
|
|
|
}
|
|
|
|
@ -3114,7 +3143,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// After Loading an RBD the user may 're-load' a modified Pane. Currently
|
|
|
|
|
// the number of panes has to be the same as previously displayed.
|
|
|
|
|
public void loadPane() {
|
|
|
|
|
String rbdName = rbd_name_txt.getText();
|
|
|
|
|
String rbdName = rbd_name_txt;
|
|
|
|
|
|
|
|
|
|
if (rbdName == null || rbdName.isEmpty()) {
|
|
|
|
|
rbdName = "Preview";
|
|
|
|
@ -3177,7 +3206,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
"Load Pane",
|
|
|
|
|
null,
|
|
|
|
|
"The pane layout of the display doesn't match the currently selected\n"
|
|
|
|
|
+ "bundle pane layout. You will first need to Load the Bundle before\n"
|
|
|
|
|
+ "Bundle pane layout. You will first need to Load the Bundle before\n"
|
|
|
|
|
+ "changing the number of panes.",
|
|
|
|
|
MessageDialog.INFORMATION, new String[] { "OK" }, 0);
|
|
|
|
|
msgDlg.open();
|
|
|
|
@ -3271,7 +3300,9 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
try {
|
|
|
|
|
rbdMngr.initFromRbdBundle(impRbd);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
groupListViewer.setInput(rbdMngr.getGroupResources());
|
|
|
|
|
|
|
|
|
|
// the new group is always added at the top.
|
|
|
|
|
if (curGrp != -1) {
|
|
|
|
|
groupListViewer.getTable().setSelection(curGrp);
|
|
|
|
@ -3282,6 +3313,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
} else {
|
|
|
|
|
this.selectUngroupedGrp();
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
} catch (VizException e) {
|
|
|
|
|
rbdMngr.init(curDispType);
|
|
|
|
@ -3373,38 +3405,40 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
pane_layout_grp.setVisible(isMultiPane);
|
|
|
|
|
|
|
|
|
|
if (isMultiPane) {
|
|
|
|
|
fd.left = new FormAttachment( 0, 10 );
|
|
|
|
|
fd.top = new FormAttachment( multi_pane_tog, 15, SWT.BOTTOM );
|
|
|
|
|
fd.bottom = new FormAttachment( 100, 0 );
|
|
|
|
|
//groupGrp.setVisible(false);
|
|
|
|
|
|
|
|
|
|
fd.left = new FormAttachment( 0, 10 );
|
|
|
|
|
//fd.top = new FormAttachment( 0, 50 );
|
|
|
|
|
fd.top = new FormAttachment(multi_pane_tog, 15, SWT.BOTTOM);
|
|
|
|
|
//fd.top = new FormAttachment(0, 10);
|
|
|
|
|
fd.bottom = new FormAttachment( 100, 0 );
|
|
|
|
|
fd.right = new FormAttachment(100, -300);
|
|
|
|
|
|
|
|
|
|
seld_rscs_grp.setLayoutData(fd);
|
|
|
|
|
|
|
|
|
|
shell.setSize(new Point(multiPaneDlgWidth, shell.getSize().y));
|
|
|
|
|
} else {
|
|
|
|
|
groupGrp.setVisible(true);
|
|
|
|
|
|
|
|
|
|
//groupGrp.setVisible(true);
|
|
|
|
|
/*
|
|
|
|
|
fd.left = new FormAttachment(geo_area_grp, 10, SWT.RIGHT);
|
|
|
|
|
// fd.left = new FormAttachment( 30, 2 );
|
|
|
|
|
// fd.top = new FormAttachment( geo_area_grp, 0, SWT.TOP );
|
|
|
|
|
fd.top = new FormAttachment(auto_update_btn, 5, SWT.BOTTOM);
|
|
|
|
|
fd.right = new FormAttachment(100, -10);
|
|
|
|
|
fd.bottom = new FormAttachment(geo_area_grp, 0, SWT.BOTTOM);
|
|
|
|
|
*/
|
|
|
|
|
fd.top = new FormAttachment( multi_pane_tog, 15, SWT.BOTTOM );
|
|
|
|
|
fd.top = new FormAttachment(multi_pane_tog, 15, SWT.BOTTOM);
|
|
|
|
|
//fd.top = new FormAttachment(0, 10);
|
|
|
|
|
fd.left = new FormAttachment( 0, 10 );
|
|
|
|
|
fd.right = new FormAttachment( 100, -10 );
|
|
|
|
|
fd.bottom = new FormAttachment( 100, 0 );
|
|
|
|
|
seld_rscs_grp.setLayoutData( fd );
|
|
|
|
|
|
|
|
|
|
shell.setSize(new Point(multiPaneDlgWidth - 10, shell.getSize().y));
|
|
|
|
|
shell.setSize( new Point( singlePaneDlgWidth, shell.getSize().y ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// the area name may be truncated based on a shorter toolbar widget
|
|
|
|
|
// reset it now that it is wider.
|
|
|
|
|
PredefinedArea area = rbdMngr.getSelectedArea();
|
|
|
|
|
setAreaTextOnMenuItem(new AreaName(area.getSource(), area.getAreaName()));
|
|
|
|
|
//setAreaTextOnMenuItem(new AreaName(area.getSource(), area.getAreaName()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void saveRBD(boolean new_pane) {
|
|
|
|
@ -3416,7 +3450,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
|
|
|
|
|
// get the filename to save to.
|
|
|
|
|
SaveRbdDialog saveDlg = new SaveRbdDialog(shell, savedSpfGroup,
|
|
|
|
|
savedSpfName, rbd_name_txt.getText(), saveRefTime,
|
|
|
|
|
savedSpfName, rbd_name_txt, saveRefTime,
|
|
|
|
|
saveTimeAsConstant);
|
|
|
|
|
|
|
|
|
|
if ((Boolean) saveDlg.open() == false) {
|
|
|
|
@ -3432,7 +3466,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// Set the name to the name that was actually used to save the RBD.
|
|
|
|
|
// TODO : we could store a list of the RBDNames and load these
|
|
|
|
|
// as items in the combo.
|
|
|
|
|
rbd_name_txt.setText(saveDlg.getSeldRbdName());
|
|
|
|
|
rbd_name_txt = saveDlg.getSeldRbdName();
|
|
|
|
|
|
|
|
|
|
rbdMngr.setGeoSyncPanes(geo_sync_panes.getSelection());
|
|
|
|
|
rbdMngr.setAutoUpdate(auto_update_btn.getSelection());
|
|
|
|
@ -3450,12 +3484,11 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
VizApp.runSync(new Runnable() {
|
|
|
|
|
public void run() {
|
|
|
|
|
String msg = null;
|
|
|
|
|
msg = new String("Bundle "
|
|
|
|
|
+ rbd_name_txt.getText() + " Saved to Group "
|
|
|
|
|
+ savedSpfName
|
|
|
|
|
+ ".");
|
|
|
|
|
msg = new String("bundle \""+
|
|
|
|
|
rbd_name_txt + "\" saved to \""+
|
|
|
|
|
savedSpfName+"\"");
|
|
|
|
|
MessageBox mb = new MessageBox(shell, SWT.OK);
|
|
|
|
|
mb.setText( "Bundle Saved" );
|
|
|
|
|
mb.setText("Bundle Saved");
|
|
|
|
|
mb.setMessage(msg);
|
|
|
|
|
mb.open();
|
|
|
|
|
|
|
|
|
@ -3530,8 +3563,8 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
try {
|
|
|
|
|
NCTimeMatcher timeMatcher = timelineControl.getTimeMatcher();
|
|
|
|
|
|
|
|
|
|
if (!rbd_name_txt.getText().isEmpty()) {
|
|
|
|
|
rbdMngr.setRbdName(rbd_name_txt.getText());
|
|
|
|
|
if (!rbd_name_txt.isEmpty()) {
|
|
|
|
|
rbdMngr.setRbdName(rbd_name_txt);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rbdMngr.setGeoSyncPanes(geo_sync_panes.getSelection());
|
|
|
|
@ -3583,6 +3616,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
// seldEditor.getPartName() +
|
|
|
|
|
// "\n*************************************************************");
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
for (String item : import_rbd_combo.getItems()) {
|
|
|
|
|
if (item.equalsIgnoreCase(seldEditor.getPartName())) {
|
|
|
|
|
try {
|
|
|
|
@ -3596,6 +3630,7 @@ public class CreateRbdControl extends Composite implements IPartListener2 {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|