You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by tw...@apache.org on 2007/01/03 16:30:57 UTC
svn commit: r492179 - in
/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view:
FSTreeModel.java Gladis.java MainFrame.java
Author: twgoetz
Date: Wed Jan 3 07:30:56 2007
New Revision: 492179
URL: http://svn.apache.org/viewvc?view=rev&rev=492179
Log:
Fix compiler warnings in CVD code.
Modified:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java?view=diff&rev=492179&r1=492178&r2=492179
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/FSTreeModel.java Wed Jan 3 07:30:56 2007
@@ -158,15 +158,15 @@
return FSNode.FLOAT_FS;
} else if (this.cas.isArrayType(type)) {
return FSNode.ARRAY_FS;
- } else if (cas.isByteArrayType(type)) {
+ } else if (this.cas.isByteArrayType(type)) {
return FSNode.BYTE_FS;
- } else if (cas.isBooleanArrayType(type)) {
+ } else if (this.cas.isBooleanArrayType(type)) {
return FSNode.BOOL_FS;
- } else if (cas.isShortArrayType(type)) {
+ } else if (this.cas.isShortArrayType(type)) {
return FSNode.SHORT_FS;
- } else if (cas.isLongArrayType(type)) {
+ } else if (this.cas.isLongArrayType(type)) {
return FSNode.LONG_FS;
- } else if (cas.isDoubleArrayType(type)) {
+ } else if (this.cas.isDoubleArrayType(type)) {
return FSNode.DOUBLE_FS;
}
return FSNode.STD_FS;
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java?view=diff&rev=492179&r1=492178&r2=492179
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/Gladis.java Wed Jan 3 07:30:56 2007
@@ -63,7 +63,7 @@
public void run() {
frame.pack();
- frame.show();
+ frame.setVisible(true);
}
});
return frame;
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java?view=diff&rev=492179&r1=492178&r2=492179
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java Wed Jan 3 07:30:56 2007
@@ -120,6 +120,7 @@
import org.apache.uima.UIMAFramework;
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.cas.CAS;
+import org.apache.uima.cas.CommonCas;
import org.apache.uima.cas.FSIndex;
import org.apache.uima.cas.FSIndexRepository;
import org.apache.uima.cas.FSIterator;
@@ -690,22 +691,22 @@
MainFrame.this.disableSofaListener = true;
String currentView = (String) MainFrame.this.sofaSelectionComboBox.getSelectedItem();
MainFrame.this.sofaSelectionComboBox.removeAllItems();
- MainFrame.this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
+ MainFrame.this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
Iterator sofas = ((CASImpl) MainFrame.this.cas).getBaseCAS().getSofaIterator();
Feature sofaIdFeat = MainFrame.this.cas.getTypeSystem().getFeatureByFullName(
- CAS.FEATURE_FULL_NAME_SOFAID);
+ CommonCas.FEATURE_FULL_NAME_SOFAID);
boolean nonDefaultSofaFound = false;
while (sofas.hasNext()) {
SofaFS sofa = (SofaFS) sofas.next();
String sofaId = sofa.getStringValue(sofaIdFeat);
- if (!CAS.NAME_DEFAULT_SOFA.equals(sofaId)) {
+ if (!CommonCas.NAME_DEFAULT_SOFA.equals(sofaId)) {
MainFrame.this.sofaSelectionComboBox.addItem(sofaId);
nonDefaultSofaFound = true;
}
}
// reuse last selected view if found in new CAS
int newIndex = 0;
- String newView = CAS.NAME_DEFAULT_SOFA;
+ String newView = CommonCas.NAME_DEFAULT_SOFA;
for (int i = 0; i < MainFrame.this.sofaSelectionComboBox.getItemCount(); i++) {
if (currentView.equals(MainFrame.this.sofaSelectionComboBox.getItemAt(i))) {
newIndex = i;
@@ -1130,7 +1131,7 @@
tsFrame.setTypeSystem(MainFrame.this.cas.getTypeSystem());
tsFrame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
tsFrame.pack();
- tsFrame.show();
+ tsFrame.setVisible(true);
}
}
@@ -1243,7 +1244,7 @@
"Customize Annotation Display");
acd.init(MainFrame.this.styleMap, MainFrame.this.cas);
acd.pack();
- acd.show();
+ acd.setVisible(true);
}
}
@@ -1342,7 +1343,7 @@
window.setContentPane(panel);
window.pack();
window.setLocationRelativeTo(MainFrame.this);
- window.show();
+ window.setVisible(true);
}
}
@@ -2499,7 +2500,7 @@
leftPanel.setLayout(new BorderLayout());
this.sofaSelectionPanel = new JPanel();
this.sofaSelectionComboBox = new JComboBox();
- this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
+ this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
this.sofaSelectionPanel.add(new JLabel("Select View:"));
this.sofaSelectionPanel.add(this.sofaSelectionComboBox);
leftPanel.add(this.sofaSelectionPanel, BorderLayout.NORTH);
@@ -2625,7 +2626,7 @@
// reset sofa combo box with just the initial view
this.disableSofaListener = true;
this.sofaSelectionComboBox.removeAllItems();
- this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
+ this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
this.sofaSelectionPanel.setVisible(false);
this.disableSofaListener = false;
// MainFrame.this.textArea.setText(null);
@@ -2642,7 +2643,7 @@
try {
if (doCasReset) {
// Change to Initial view
- this.cas = this.cas.getView(CAS.NAME_DEFAULT_SOFA);
+ this.cas = this.cas.getView(CommonCas.NAME_DEFAULT_SOFA);
this.cas.reset();
setLanguage();
this.cas.setDocumentText(this.textArea.getText());
@@ -2654,15 +2655,15 @@
this.disableSofaListener = true;
int currentViewID = this.sofaSelectionComboBox.getSelectedIndex();
this.sofaSelectionComboBox.removeAllItems();
- this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
+ this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
Iterator sofas = ((CASImpl) MainFrame.this.cas).getBaseCAS().getSofaIterator();
Feature sofaIdFeat = MainFrame.this.cas.getTypeSystem().getFeatureByFullName(
- CAS.FEATURE_FULL_NAME_SOFAID);
+ CommonCas.FEATURE_FULL_NAME_SOFAID);
boolean nonDefaultSofaFound = false;
while (sofas.hasNext()) {
SofaFS sofa = (SofaFS) sofas.next();
String sofaId = sofa.getStringValue(sofaIdFeat);
- if (!CAS.NAME_DEFAULT_SOFA.equals(sofaId)) {
+ if (!CommonCas.NAME_DEFAULT_SOFA.equals(sofaId)) {
this.sofaSelectionComboBox.addItem(sofaId);
nonDefaultSofaFound = true;
}