summaryrefslogtreecommitdiff
path: root/odk/examples/java/Inspector
diff options
context:
space:
mode:
Diffstat (limited to 'odk/examples/java/Inspector')
-rw-r--r--odk/examples/java/Inspector/HideableTreeModel.java36
-rw-r--r--odk/examples/java/Inspector/SourceCodeGenerator.java91
2 files changed, 1 insertions, 126 deletions
diff --git a/odk/examples/java/Inspector/HideableTreeModel.java b/odk/examples/java/Inspector/HideableTreeModel.java
index 6fea28681b7b..dae9d0cdff0a 100644
--- a/odk/examples/java/Inspector/HideableTreeModel.java
+++ b/odk/examples/java/Inspector/HideableTreeModel.java
@@ -17,9 +17,6 @@
*/
import java.util.ArrayList;
-import java.util.Enumeration;
-
-import javax.swing.JTree;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreeModel;
@@ -87,14 +84,6 @@ public class HideableTreeModel implements TreeModel {
- private void reload(Object node) {
- if(node != null) {
- TreePath tp = new TreePath(getPathToRoot(node));
- fireTreeStructureChanged(new TreeModelEvent(this, tp));
- }
- }
-
-
public void valueForPathChanged(TreePath path, Object newValue) {
nodeChanged(path.getLastPathComponent());
}
@@ -153,30 +142,7 @@ public class HideableTreeModel implements TreeModel {
}
}
- private void fireTreeStructureChanged(TreeModelEvent event) {
- for(TreeModelListener l : modelListeners) {
- l.treeStructureChanged(event);
- }
- }
-
-
-
-
-
- private void addExpandedPaths(JTree tree, TreePath path, ArrayList<TreePath> pathlist) {
- Enumeration aEnum = tree.getExpandedDescendants(path);
- while(aEnum.hasMoreElements()) {
- TreePath tp = (TreePath) aEnum.nextElement();
- pathlist.add(tp);
- addExpandedPaths(tree, tp, pathlist);
- }
- }
-
-
-
-
-
- public boolean isLeaf(Object _oNode) {
+ public boolean isLeaf(Object _oNode) {
if(_oNode instanceof TreeNode) {
return ((TreeNode) _oNode).isLeaf();
}
diff --git a/odk/examples/java/Inspector/SourceCodeGenerator.java b/odk/examples/java/Inspector/SourceCodeGenerator.java
index 5444c7aec8ca..2eae0ff44f22 100644
--- a/odk/examples/java/Inspector/SourceCodeGenerator.java
+++ b/odk/examples/java/Inspector/SourceCodeGenerator.java
@@ -613,23 +613,11 @@ private class UnoObjectDefinition{
}
- public void setTypeClass(TypeClass _aTypeClass){
- sVariableStemName = "";
- m_aTypeClass = _aTypeClass;
- }
-
-
public TypeClass getTypeClass(){
return m_aTypeClass;
}
- public void setTypeName(String _sTypeName){
- sVariableStemName = "";
- m_sTypeName = _sTypeName;
- }
-
-
public String getTypeName(){
return m_sTypeName;
}
@@ -1080,10 +1068,6 @@ private class UnoObjectDefinition{
return "short";
}
- public String getunsignedshortTypeDescription(){
- return "short";
- }
-
public String getlongTypeDescription(){
return "int";
}
@@ -1121,15 +1105,6 @@ private class UnoObjectDefinition{
}
}
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "com.sun.star.uno.Type";
- }
- else{
- return "Type";
- }
- }
-
public String getanyTypeDescription(boolean _bAsHeaderSourceCode){
if (_bAsHeaderSourceCode){
return "";
@@ -1157,21 +1132,6 @@ private class UnoObjectDefinition{
}
- public String getArrayDeclaration(String _sVariableDeclaration){
- String sReturn = "";
- String[] sDeclarations = _sVariableDeclaration.split(" ");
- for (int i = 0; i< sDeclarations.length;i++){
- sReturn += sDeclarations[i];
- if (i == 0){
- sReturn += "[]";
- }
- if (i < (sDeclarations.length -1)){
- sReturn += " ";
- }
- }
- return sReturn;
- }
-
public String getCommentSign(){
return "//";
}
@@ -1280,10 +1240,6 @@ private class UnoObjectDefinition{
return "Integer";
}
- public String getunsignedshortTypeDescription(){
- return "Integer";
- }
-
public String getlongTypeDescription(){
return "Integer";
}
@@ -1321,15 +1277,6 @@ private class UnoObjectDefinition{
}
}
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "";
- }
- else{
- return "Object";
- }
- }
-
public String getanyTypeDescription(boolean _bAsHeaderSourceCode){
if (_bAsHeaderSourceCode){
return "";
@@ -1361,21 +1308,6 @@ private class UnoObjectDefinition{
}
- public String getArrayDeclaration(String _sVariableDeclaration){
- String sReturn = "";
- String[] sDeclarations = _sVariableDeclaration.split(" ");
- for (int i = 0; i< sDeclarations.length;i++){
- sReturn += sDeclarations[i];
- if (i == 0){
- sReturn += "[]";
- }
- if (i < (sDeclarations.length -1)){
- sReturn += " ";
- }
- }
- return sReturn;
- }
-
public String getCommentSign(){
return "'";
}
@@ -1596,10 +1528,6 @@ private class UnoObjectDefinition{
return "sal_Int16";
}
- public String getunsignedshortTypeDescription(){
- return "sal_uInt16";
- }
-
public String getlongTypeDescription(){
return "sal_Int32";
}
@@ -1638,15 +1566,6 @@ private class UnoObjectDefinition{
}
}
- public String gettypeTypeDescription(boolean _bAsHeaderSourceCode){
- if (_bAsHeaderSourceCode){
- return "com/sun/star/uno/Type";
- }
- else{
- return "Type";
- }
- }
-
public String getanyTypeDescription(boolean _bAsHeaderSourceCode){
if (_bAsHeaderSourceCode){
return "com/sun/star/uno/XInterface";
@@ -1705,16 +1624,6 @@ private class UnoObjectDefinition{
return sReturn;
}
- public String getArrayDeclaration(String _sVariableDeclaration){
- this.bIncludeSequenceHeader = true;
- String sReturn = "";
- String[] sDeclarations = _sVariableDeclaration.split(" ");
- if (sDeclarations.length == 2){
- sReturn = getCSSNameSpaceString() +"::uno::Sequence<" + sDeclarations[1] + ">";
- }
- return sReturn;
- }
-
public String getCommentSign(){
return "//";
}