[openrtm-commit:00635] r254 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder: . ui/editors
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 2月 2日 (木) 16:50:09 JST
Author: sakamoto
Date: 2012-02-02 16:50:09 +0900 (Thu, 02 Feb 2012)
New Revision: 254
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcBuilderEditor.java
Log:
Modified TableViewer for MacOS #2238
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java 2012-02-02 02:53:39 UTC (rev 253)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/IRtcBuilderConstants.java 2012-02-02 07:50:09 UTC (rev 254)
@@ -163,4 +163,5 @@
public static final int PORT_SPACE_HEIGHT = 60;
public static final int PORT_SPACE_WIDTH = 150;
+ public static final int SINGLE_COLUMN_WIDTH = 200;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java 2012-02-02 02:53:39 UTC (rev 253)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java 2012-02-02 07:50:09 UTC (rev 254)
@@ -301,6 +301,8 @@
for( int intidx=IRtcBuilderConstants.ACTIVITY_INITIALIZE; intidx<IRtcBuilderConstants.ACTIVITY_DUMMY; intidx++) {
if( rtcParam.getActionImplemented(intidx) ) {
implChk.get(intidx).setBackground(new Color(PlatformUI.getWorkbench().getDisplay(), BuilderViewPreferenceManager.defaultRGBMap.get(BuilderViewPreferenceManager.COLOR_COMPONENT)));
+ } else {
+ implChk.get(intidx).setBackground(getSite().getShell().getDisplay().getSystemColor(SWT.COLOR_WHITE));
}
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java 2012-02-02 02:53:39 UTC (rev 253)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java 2012-02-02 07:50:09 UTC (rev 254)
@@ -167,7 +167,7 @@
IMessageConstants.CONFIGURATION_LBL_UNIT, SWT.BORDER);
constraintConfigText = createLabelAndText(toolkit, detailGroup,
IMessageConstants.CONFIGURATION_LBL_CONSTRAINT, SWT.BORDER);
- String[] widgetItems = {"text", "slider", "spin", "radio" };
+ String[] widgetItems = {"text", "slider", "spin", "radio", "checkbox", "ordered_list" };
widgetCombo = createLabelAndCombo(toolkit, detailGroup, IMessageConstants.CONFIGURATION_LBL_WIDGET,
widgetItems);
stepText = createLabelAndText(toolkit, detailGroup,
@@ -218,7 +218,7 @@
//
final TableViewer configSetTableViewer = createTableViewer(toolkit, composite);
final TableViewerColumn col = super.createColumn(configSetTableViewer,
- IMessageConstants.REQUIRED + IMessageConstants.CONFIGURATION_TBLLBL_NAME, 200);
+ IMessageConstants.REQUIRED + IMessageConstants.CONFIGURATION_TBLLBL_NAME, IRtcBuilderConstants.SINGLE_COLUMN_WIDTH);
col.setEditingSupport(new ConfigSetCellModifier(configSetTableViewer));
// col.getColumn().setResizable(false);
configSetTableViewer.setLabelProvider(new ConfigSetLabelProvider());
@@ -337,8 +337,8 @@
IMessageConstants.CONFIGURATION_PARAMETER_TITLE, IMessageConstants.CONFIGURATION_PARAMETER_EXPL, 3);
//
final TableViewer configParameterTableViewer = createTableViewer(toolkit, configurationParameterSectionComposite);
- createConfigProfileColumn(configParameterTableViewer, IMessageConstants.CONFIGURATION_TBLLBL_CONFIGURATION, 200, CONFIGPROFILE_CONFIGURATION);
- createConfigProfileColumn(configParameterTableViewer, IMessageConstants.CONFIGURATION_TBLLBL_DEFAULTVAL, 200, CONFIGPROFILE_DEFAULT);
+ createConfigProfileColumn(configParameterTableViewer, IMessageConstants.CONFIGURATION_TBLLBL_CONFIGURATION, IRtcBuilderConstants.SINGLE_COLUMN_WIDTH, CONFIGPROFILE_CONFIGURATION);
+ createConfigProfileColumn(configParameterTableViewer, IMessageConstants.CONFIGURATION_TBLLBL_DEFAULTVAL, IRtcBuilderConstants.SINGLE_COLUMN_WIDTH, CONFIGPROFILE_DEFAULT);
configParameterTableViewer.setLabelProvider(new ConfigParamLabelProvider());
//
Composite buttonComposite = toolkit.createComposite(configurationParameterSectionComposite, SWT.NONE);
@@ -482,8 +482,9 @@
//
RtcParam rtcParam = editor.getRtcParam();
configurationSetTableViewer.setInput(rtcParam.getConfigParams());
- configurationProfileTableViewer.setInput(rtcParam
- .getConfigParameterParams());
+ configurationProfileTableViewer.setInput(rtcParam.getConfigParameterParams());
+ //Mac版では列の幅が最小化してしまうため,再度列幅を設定
+ configurationSetTableViewer.getTable().getColumn(0).setWidth(IRtcBuilderConstants.SINGLE_COLUMN_WIDTH);
//
StructuredSelection selection = (StructuredSelection) configurationSetTableViewer
.getSelection();
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java 2012-02-02 02:53:39 UTC (rev 253)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java 2012-02-02 07:50:09 UTC (rev 254)
@@ -5,6 +5,7 @@
import java.util.List;
import java.util.Set;
+import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
import jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin;
import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
@@ -88,7 +89,7 @@
updateDefaultValue();
}
- private void updateDefaultValue() {
+ public void updateDefaultValue() {
IPreferenceStore store = RtcBuilderPlugin.getDefault().getPreferenceStore();
defaultPortName = ComponentPreferenceManager.getInstance().getDataPort_Name();
defaultPortType = store.getString(ComponentPreferenceManager.Generate_DataPort_Type);
@@ -193,7 +194,7 @@
final TableViewer portParamTableViewer = createTableViewer(toolkit, parent, 70);
- final TableViewerColumn col = super.createColumn(portParamTableViewer, columnLabel, 200);
+ final TableViewerColumn col = super.createColumn(portParamTableViewer, columnLabel, IRtcBuilderConstants.SINGLE_COLUMN_WIDTH);
col.setEditingSupport(new DataPortEditingSuport(portParamTableViewer));
// col.getColumn().setResizable(false);
portParamTableViewer.setLabelProvider(new DataPortParamLabelProvider());
@@ -354,6 +355,9 @@
RtcParam rtcParam = editor.getRtcParam();
outportTableViewer.setInput(rtcParam.getOutports());
inportTableViewer.setInput(rtcParam.getInports());
+ //Mac版では列の幅が最小化してしまうため,再度列幅を設定
+ outportTableViewer.getTable().getColumn(0).setWidth(IRtcBuilderConstants.SINGLE_COLUMN_WIDTH);
+ inportTableViewer.getTable().getColumn(0).setWidth(IRtcBuilderConstants.SINGLE_COLUMN_WIDTH);
//
StructuredSelection selection = (StructuredSelection) outportTableViewer
.getSelection();
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcBuilderEditor.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcBuilderEditor.java 2012-02-02 02:53:39 UTC (rev 253)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/RtcBuilderEditor.java 2012-02-02 07:50:09 UTC (rev 254)
@@ -348,6 +348,14 @@
protected void addDefaultComboValue(){
basicFormPage.addDefaultComboValue();
}
+
+ public void updateDataTypes() {
+ if( dataPortFormPage != null ) dataPortFormPage.updateDefaultValue();
+ }
+
+ public void updatePages() {
+ if( activityFormPage != null ) activityFormPage.load();
+ }
public String validateParam() {
String result = null;
openrtm-commit メーリングリストの案内