5.2 beta2
authorChristian Schwarzinger <christian.schwarzinger@proclos.com>
Wed, 01 Oct 2014 13:48:09 +0200
changeset 36a857b6ed4d75
parent 35 e9d32807bc33
child 37 b43269ca6e46
5.2 beta2
dist/PalOOCa.jar
dist/PalOOCa.oxt
dist/PalOOCa_IDL_types.jar
dist/external_jars/jars.properties
lib/palojlib-5.1.jar
src/Addons.xcu
src/org/palooca/PalOOCaView.java
src/org/palooca/dialogs/DimensionSubsetList.java
src/org/palooca/dialogs/DimensionSubsetListItem.java
src/org/palooca/dialogs/ElementBrowserDialog.java
src/org/palooca/dialogs/ElementSingleSelectDialog.java
src/org/palooca/dialogs/Modeller.java
src/org/palooca/dialogs/PaloDialogUtilities.java
src/org/palooca/dialogs/ViewDialog.java
src/org/palooca/network/ConnectionInfo.java
     1.1 Binary file dist/PalOOCa.jar has changed
     2.1 Binary file dist/PalOOCa.oxt has changed
     3.1 Binary file dist/PalOOCa_IDL_types.jar has changed
     4.1 --- a/dist/external_jars/jars.properties	Tue Sep 30 15:26:47 2014 +0200
     4.2 +++ b/dist/external_jars/jars.properties	Wed Oct 01 13:48:09 2014 +0200
     4.3 @@ -1,3 +1,3 @@
     4.4  #PackageActionDescription
     4.5 -#Tue Sep 30 15:25:31 CEST 2014
     4.6 +#Wed Oct 01 13:44:32 CEST 2014
     4.7  external.jars=external_jars/dom4j-1.6.1.jar external_jars/swing-layout-1.0.4.jar external_jars/appframework-1.0.3.jar external_jars/swing-worker-1.1.jar external_jars/AbsoluteLayout.jar external_jars/log4j-1.2.16.jar external_jars/xercesImpl.jar external_jars/h2-1.3.172.jar external_jars/olap4j-1.2.0-SNAPSHOT.jar external_jars/olap4j-xmla-1.2.0-SNAPSHOT.jar external_jars/palojlib-5.1.jar external_jars/jdom-2.0.5.jar
     5.1 Binary file lib/palojlib-5.1.jar has changed
     6.1 --- a/src/Addons.xcu	Tue Sep 30 15:26:47 2014 +0200
     6.2 +++ b/src/Addons.xcu	Wed Oct 01 13:48:09 2014 +0200
     6.3 @@ -106,6 +106,7 @@
     6.4                <value xml:lang="de">~Modeller...</value>
     6.5              </prop>
     6.6            </node>
     6.7 +          <!--
     6.8            <node oor:name="m008" oor:op="replace">
     6.9              <prop oor:name="Context" oor:type="xs:string">
    6.10                <value>com.sun.star.sheet.SpreadsheetDocument</value>
    6.11 @@ -136,6 +137,7 @@
    6.12                    <value xml:lang="de">Import~funktionen ausf├╝hren</value>
    6.13                  </prop>
    6.14                </node>
    6.15 +           
    6.16                <node oor:name="m008-002" oor:op="replace">
    6.17                  <prop oor:name="Context" oor:type="xs:string">
    6.18                    <value>com.sun.star.sheet.SpreadsheetDocument</value>
    6.19 @@ -153,6 +155,7 @@
    6.20                </node>
    6.21              </node>
    6.22            </node>
    6.23 +          -->
    6.24            <node oor:name="m009" oor:op="replace">
    6.25              <prop oor:name="Context" oor:type="xs:string">
    6.26                <value>com.sun.star.sheet.SpreadsheetDocument</value>
     7.1 --- a/src/org/palooca/PalOOCaView.java	Tue Sep 30 15:26:47 2014 +0200
     7.2 +++ b/src/org/palooca/PalOOCaView.java	Wed Oct 01 13:48:09 2014 +0200
     7.3 @@ -989,7 +989,7 @@
     7.4              if (!cellStyles.hasByName("PaloDataOdd")) {
     7.5                  cellStyle = manager.createCellStyle(cellStyles, "PaloDataOdd");
     7.6                  cellStyle.setPropertyValue("IsCellBackgroundTransparent", Boolean.FALSE);
     7.7 -                cellStyle.setPropertyValue("CellBackColor", new Integer(0xF9F9F4));
     7.8 +                cellStyle.setPropertyValue("CellBackColor", new Integer(0xF7F7F2));
     7.9                  cellStyle.setPropertyValue("NumberFormat", new Integer(manager.getNumberFormat(2)));
    7.10                  cellStyle.setPropertyValue("CharColor", new Integer(0x000000));
    7.11              }
     8.1 --- a/src/org/palooca/dialogs/DimensionSubsetList.java	Tue Sep 30 15:26:47 2014 +0200
     8.2 +++ b/src/org/palooca/dialogs/DimensionSubsetList.java	Wed Oct 01 13:48:09 2014 +0200
     8.3 @@ -241,17 +241,9 @@
     8.4          }
     8.5      }
     8.6  
     8.7 -    //Handle mouse events.
     8.8 -    public void mouseClicked(MouseEvent e) {
     8.9 -        
    8.10 +    private void mouseClicked(Point p, int clickcount) {
    8.11          boolean changed = true;
    8.12 -        Point   p = null;
    8.13 -        if (e != null) {
    8.14 -          p = new Point(e.getX(), e.getY());
    8.15 -        }
    8.16 -        else {
    8.17 -          p = new Point(-1, -1);
    8.18 -        }
    8.19 +
    8.20          Graphics g = this.getGraphics();
    8.21          int itemHeight = getItemHeight(g);
    8.22  
    8.23 @@ -281,7 +273,7 @@
    8.24              if (open) {
    8.25                  if (r.contains(p)) {
    8.26                      dimItem.setSubset(null);
    8.27 -                    if (e.getClickCount() == 2) {
    8.28 +                    if (clickcount == 2) {
    8.29                          if (isFilter()) {
    8.30                              ElementSingleSelectDialog browser = new ElementSingleSelectDialog(
    8.31                                                          null, true, context,
    8.32 @@ -355,6 +347,21 @@
    8.33              drawingPane.revalidate();
    8.34          }
    8.35          drawingPane.repaint();
    8.36 +
    8.37 +    }
    8.38 +
    8.39 +    //Handle mouse events.
    8.40 +    public void mouseClicked(MouseEvent e) {
    8.41 +        
    8.42 +        Point   p = null;
    8.43 +        if (e != null) {
    8.44 +          p = new Point(e.getX(), e.getY());
    8.45 +        }
    8.46 +        else {
    8.47 +          p = new Point(-1, -1);
    8.48 +        }
    8.49 +        mouseClicked(p, e.getClickCount());
    8.50 +        
    8.51      }
    8.52  
    8.53      private int getDimensionItemByLocation(Point p) {
    8.54 @@ -453,12 +460,20 @@
    8.55          }
    8.56  
    8.57          draggedNode = null;
    8.58 -        repaint();
    8.59 -        mouseClicked(null);
    8.60 +        mouseClicked(new Point(-1,-1),0);
    8.61 +        //the follwing should not be necessary but tries to fix a rerendering problem on dropping while moving with the mouse outside of component. TODO find better solution
    8.62 +        Container container = this;
    8.63 +        while (container.getParent() != null) {
    8.64 +            container = container.getParent();
    8.65 +            container.validate();
    8.66 +            container.repaint();
    8.67 +        }
    8.68          //mouseClicked(new MouseEvent(this,0,new Date().getTime(),0,dsde.getLocation().x,dsde.getLocation().y,1,false));
    8.69      }
    8.70  
    8.71      public void dragExit(DragSourceEvent dse) {
    8.72 +        revalidate();
    8.73 +        repaint();
    8.74      }
    8.75  
    8.76      public void dragEnter(DropTargetDragEvent dtde) {
    8.77 @@ -492,7 +507,6 @@
    8.78                      selectedIndex = index;
    8.79                  }
    8.80                  closeAllDimensionItems();
    8.81 -                repaint();
    8.82              } else {
    8.83                  dtde.rejectDrop();
    8.84                  return;
    8.85 @@ -505,7 +519,9 @@
    8.86          }
    8.87  
    8.88          dtde.dropComplete(dropped);
    8.89 -        mouseClicked(null);
    8.90 +        mouseClicked(new Point(-1,-1),0);
    8.91 +        revalidate();
    8.92 +        repaint();
    8.93          //mouseClicked(new MouseEvent(this,0,new Date().getTime(),0,dtde.getLocation().x,dtde.getLocation().y,1,false));
    8.94      }
    8.95  
     9.1 --- a/src/org/palooca/dialogs/DimensionSubsetListItem.java	Tue Sep 30 15:26:47 2014 +0200
     9.2 +++ b/src/org/palooca/dialogs/DimensionSubsetListItem.java	Wed Oct 01 13:48:09 2014 +0200
     9.3 @@ -155,6 +155,32 @@
     9.4          return selectedElements;
     9.5      }
     9.6  
     9.7 +    /*
     9.8 +    public Vector<String[]> getSelectedElementsCleaned() {
     9.9 +        Vector<String[]> input = getSelectedElements();
    9.10 +        Vector<String[]> result = new Vector<String[]>();
    9.11 +        for (String[] sa : input) {
    9.12 +            boolean needsCleaning = false;
    9.13 +            for (String s : sa) {
    9.14 +                if (s == null) {
    9.15 +                    needsCleaning = true;
    9.16 +                    break;
    9.17 +                }
    9.18 +            }
    9.19 +            if (needsCleaning) {
    9.20 +                List<String> temp = new ArrayList<String>();
    9.21 +                for (String s : sa) {
    9.22 +                    if (s != null) temp.add(s);
    9.23 +                }
    9.24 +                result.add(temp.toArray(new String[0]));
    9.25 +            } else {
    9.26 +                result.add(sa);
    9.27 +            }
    9.28 +        }
    9.29 +        return result;
    9.30 +    }
    9.31 +     * */
    9.32 +
    9.33      public String getSelectedElementStringPath(int index) {
    9.34          String[] path = selectedElements.get(index);
    9.35          if (path != null && path.length > 0) {
    10.1 --- a/src/org/palooca/dialogs/ElementBrowserDialog.java	Tue Sep 30 15:26:47 2014 +0200
    10.2 +++ b/src/org/palooca/dialogs/ElementBrowserDialog.java	Wed Oct 01 13:48:09 2014 +0200
    10.3 @@ -124,7 +124,7 @@
    10.4                      if (treeElements.isPathSelected(path)) {
    10.5                          irregular = true;
    10.6                      }
    10.7 -
    10.8 +                    if (path.getParentPath() != null) treeElements.expandPath(path.getParentPath());
    10.9                      paths[i] = path;
   10.10                  }
   10.11              }
   10.12 @@ -148,7 +148,7 @@
   10.13                  treeElements.collapseRow(i);
   10.14              }
   10.15          } else {
   10.16 -            elementModel.clear();
   10.17 +            //elementModel.clear();
   10.18          }
   10.19      }
   10.20  
   10.21 @@ -682,7 +682,7 @@
   10.22      }//GEN-LAST:event_mnuSelectAllActionPerformed
   10.23  
   10.24      private void treeElementsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_treeElementsMouseClicked
   10.25 -        if (evt.getClickCount() == 2) {
   10.26 +        if ((evt.getClickCount() == 2 && evt.isShiftDown())) {
   10.27              jButtonMoveRight.doClick();
   10.28          }
   10.29  }//GEN-LAST:event_treeElementsMouseClicked
    11.1 --- a/src/org/palooca/dialogs/ElementSingleSelectDialog.java	Tue Sep 30 15:26:47 2014 +0200
    11.2 +++ b/src/org/palooca/dialogs/ElementSingleSelectDialog.java	Wed Oct 01 13:48:09 2014 +0200
    11.3 @@ -489,7 +489,7 @@
    11.4      }//GEN-LAST:event_trElementsValueChanged
    11.5  
    11.6      private void trElementsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_trElementsMouseClicked
    11.7 -        if (evt.getClickCount() == 2)
    11.8 +        if ((evt.getClickCount() == 2 && evt.isShiftDown()))
    11.9              btnOK.doClick();
   11.10  }//GEN-LAST:event_trElementsMouseClicked
   11.11  
    12.1 --- a/src/org/palooca/dialogs/Modeller.java	Tue Sep 30 15:26:47 2014 +0200
    12.2 +++ b/src/org/palooca/dialogs/Modeller.java	Wed Oct 01 13:48:09 2014 +0200
    12.3 @@ -5975,11 +5975,11 @@
    12.4  
    12.5      private void treeHierarchyMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_treeHierarchyMouseClicked
    12.6          // TODO add your handling code here:
    12.7 -        if (evt.getClickCount() > 1) {
    12.8 +        if (evt.getClickCount() > 1 && evt.isShiftDown()) {
    12.9              TreePath path = treeHierarchy.getSelectionPath();
   12.10              if (path != null) {
   12.11                   DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
   12.12 -                 if (node.getChildCount() == 0) {
   12.13 +                 if (node.getParent() != null && node.getParent() instanceof ElementTreeNode) {
   12.14                      btnWeightActionPerformed(null);
   12.15                   }
   12.16              }
    13.1 --- a/src/org/palooca/dialogs/PaloDialogUtilities.java	Tue Sep 30 15:26:47 2014 +0200
    13.2 +++ b/src/org/palooca/dialogs/PaloDialogUtilities.java	Wed Oct 01 13:48:09 2014 +0200
    13.3 @@ -338,8 +338,10 @@
    13.4  //        if (o == null)
    13.5  //            return null;
    13.6  
    13.7 +        System.err.println(o+" : "+nodes[depth]);
    13.8 +
    13.9          // If equal, go down the branch
   13.10 -        if ((o == null && nodes[depth] == null) || o.equals(nodes[depth])) {
   13.11 +        if ((depth == 0) || o.equals(nodes[depth])) {
   13.12              // If at end, return match
   13.13              if (depth == nodes.length - 1) {
   13.14                  return parent;
    14.1 --- a/src/org/palooca/dialogs/ViewDialog.java	Tue Sep 30 15:26:47 2014 +0200
    14.2 +++ b/src/org/palooca/dialogs/ViewDialog.java	Wed Oct 01 13:48:09 2014 +0200
    14.3 @@ -661,7 +661,10 @@
    14.4          }
    14.5          if (info != null) {
    14.6              if (!info.getState().equals(ConnectionState.Connected)) {
    14.7 -                info.connect();
    14.8 +                info.connect(1000);
    14.9 +                if (!info.getState().equals(ConnectionState.Connected)) {
   14.10 +                    return;
   14.11 +                }
   14.12              } else {
   14.13                  if (info.getConnection() instanceof com.jedox.palojlib.main.Connection) {
   14.14                      com.jedox.palojlib.main.Connection conn = (com.jedox.palojlib.main.Connection)info.getConnection();
    15.1 --- a/src/org/palooca/network/ConnectionInfo.java	Tue Sep 30 15:26:47 2014 +0200
    15.2 +++ b/src/org/palooca/network/ConnectionInfo.java	Wed Oct 01 13:48:09 2014 +0200
    15.3 @@ -294,9 +294,15 @@
    15.4              if (System.currentTimeMillis() - lastTry > retryInterval) {
    15.5                  lastTry = System.currentTimeMillis();
    15.6                  if (!connect(timeout) && state != oldState) {
    15.7 -                    RunnableWarning modal = new RunnableWarning(String.format(owner.getResourceBundle().getString("Connection_Failed_Text"), host, port),owner.getResourceBundle().getString("Connection_Failed_Caption"));
    15.8 -                    Thread thread = new Thread(modal);
    15.9 -                    thread.start();
   15.10 +                    if (comp == null) {
   15.11 +                        RunnableWarning modal = new RunnableWarning(String.format(owner.getResourceBundle().getString("Connection_Failed_Text"), host, port),owner.getResourceBundle().getString("Connection_Failed_Caption"));
   15.12 +                        Thread thread = new Thread(modal);
   15.13 +                        thread.start();
   15.14 +                    } else {
   15.15 +                        JOptionPane.showMessageDialog(comp,
   15.16 +                        String.format(owner.getResourceBundle().getString("Connection_Failed_Text"), host, port),
   15.17 +                        owner.getResourceBundle().getString("Connection_Failed_Caption"), JOptionPane.WARNING_MESSAGE);
   15.18 +                    }
   15.19                  }
   15.20              }
   15.21          }