|
From: <jan...@us...> - 2007-01-15 23:51:27
|
Revision: 509
http://svn.sourceforge.net/magicmap/?rev=509&view=rev
Author: jan_fride
Date: 2007-01-15 15:51:04 -0800 (Mon, 15 Jan 2007)
Log Message:
-----------
MeasurementModel show every client.
one bug: ap for all clients are shown, only after the first selection of a clint!?
Modified Paths:
--------------
trunk/magicmapclient/magicmapclient.iml
trunk/magicmapclient/src/net/sf/magicmap/client/controller/PollHandler.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/MeasurementTable.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/MeasurementView.java
trunk/magicmapclient/src/net/sf/magicmap/client/model/measurement/IMeasurementModel.java
trunk/magicmapclient/src/net/sf/magicmap/client/model/measurement/MeasurementModel.java
trunk/magicmapclient/src/net/sf/magicmap/client/model/node/IMagicEdge.java
trunk/magicmapserver/magicmapserver.iml
Added Paths:
-----------
trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/MeasureTableCellRenderer.java
Modified: trunk/magicmapclient/magicmapclient.iml
===================================================================
--- trunk/magicmapclient/magicmapclient.iml 2007-01-14 20:56:16 UTC (rev 508)
+++ trunk/magicmapclient/magicmapclient.iml 2007-01-15 23:51:04 UTC (rev 509)
@@ -6,13 +6,13 @@
<exclude-output />
<output-test url="file://$MODULE_DIR$/build-test" />
<content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/inf" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/perl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.settings" />
- <excludeFolder url="file://$MODULE_DIR$/inf" />
<excludeFolder url="file://$MODULE_DIR$/lib" />
<excludeFolder url="file://$MODULE_DIR$/lib-dev" />
</content>
@@ -290,15 +290,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/build" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/controller/PollHandler.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/controller/PollHandler.java 2007-01-14 20:56:16 UTC (rev 508)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/controller/PollHandler.java 2007-01-15 23:51:04 UTC (rev 509)
@@ -4,476 +4,459 @@
package net.sf.magicmap.client.controller;
+import net.sf.magicmap.client.interfaces.ServerPollerListener;
+import net.sf.magicmap.client.model.node.*;
+import net.sf.magicmap.server.dto.*;
+
+import javax.swing.*;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
-import javax.swing.SwingUtilities;
-
-import net.sf.magicmap.client.interfaces.ServerPollerListener;
-import net.sf.magicmap.client.model.node.AccessPointNode;
-import net.sf.magicmap.client.model.node.ClientNode;
-import net.sf.magicmap.client.model.node.GeoPos;
-import net.sf.magicmap.client.model.node.GeoPosNode;
-import net.sf.magicmap.client.model.node.INodeModel;
-import net.sf.magicmap.client.model.node.InfoObject;
-import net.sf.magicmap.client.model.node.LocationNode;
-import net.sf.magicmap.client.model.node.MapNode;
-import net.sf.magicmap.client.model.node.Node;
-import net.sf.magicmap.client.model.node.NodeModelConstants;
-import net.sf.magicmap.server.dto.AccessPointDTO;
-import net.sf.magicmap.server.dto.ClientDTO;
-import net.sf.magicmap.server.dto.GeoPointDTO;
-import net.sf.magicmap.server.dto.MapDTO;
-import net.sf.magicmap.server.dto.PositionDTO;
-import net.sf.magicmap.server.dto.SignalCharacterDTO;
-import net.sf.magicmap.server.dto.SimpleScanResultDTO;
-
/**
* Wertet die Ergebnisse des Pollers aus und gibt sie in geeigneter Weise an den
* Client weiter.
- *
+ *
* @author thuebner
*/
public class PollHandler implements ServerPollerListener {
- private Controller controller;
+ private Controller controller;
- public PollHandler(Controller controller) {
- this.controller = controller;
- }
+ public PollHandler(Controller controller) {
+ this.controller = controller;
+ }
- /**
- * Werte ein PositionDTO-Objekt aus und generiert entsprechende Ergenisse
- * f\xFCr die Aktualisierung der Modelle und somit auch der Views. In dieser
- * Methode ist es wichtig alle m\xF6glichen Fehlersituation zu ber\xFCcksichtigen,
- * da stets nur Differenzen seit einem Zeitstempel \xFCbertragen werden. Also:
- * Defensiv programmieren aber nicht gleich wegen jeder Inkonsistenz
- * abbrechen.... ;-)
- *
- * @see net.sf.magicmap.client.interfaces.ServerPollerListener#positionCreatedOrUpdatedOrDeleted(java.lang.String,
- * long, net.sf.magicmap.client.delegate.dto.PositionDTO)
- */
- public void positionCreatedOrUpdatedOrDeleted(final PositionDTO position){
+ /**
+ * Werte ein PositionDTO-Objekt aus und generiert entsprechende Ergenisse
+ * f\xFCr die Aktualisierung der Modelle und somit auch der Views. In dieser
+ * Methode ist es wichtig alle m\xF6glichen Fehlersituation zu ber\xFCcksichtigen,
+ * da stets nur Differenzen seit einem Zeitstempel \xFCbertragen werden. Also:
+ * Defensiv programmieren aber nicht gleich wegen jeder Inkonsistenz
+ * abbrechen.... ;-)
+ * @see net.sf.magicmap.client.interfaces.ServerPollerListener
+ */
+ public void positionCreatedOrUpdatedOrDeleted(final PositionDTO position){
- try {
- SwingUtilities.invokeAndWait(new Runnable() {
+ try {
+ SwingUtilities.invokeAndWait(new Runnable() {
- public void run(){
- try {
- INodeModel nodeModel = PollHandler.this.controller.getNodeModel();
- Node node = nodeModel.findNode(position.getName());
+ public void run(){
+ try {
+ INodeModel nodeModel = PollHandler.this.controller.getNodeModel();
+ Node node = nodeModel.findNode(position.getName());
- if (position.isDeleted()) {
+ if (position.isDeleted()) {
- if (position.getClient() == null && position.getAccessPoint() == null) {
- if (node != null) {
- // Referenzpunkt wird gel\xF6scht
- if (node.getType() == NodeModelConstants.NODETYPE_LOCATION) // Aus dem lokalen Graphen entfernen das
- // Ding
- nodeModel.removeNode(node);
- else
- System.out
- .println("Position with location information deleted, but node with given name is not a location!");
- } else
- System.out
- .println("Position with location information deleted, but no node found for it.");
- return;
- }
- if (position.getClient() != null) // Node client =
- // nodeModel.findNode(position.getClient().getName());
- /*
- * if (client != null) { // Client wurde "frei"
- * gemacht if (client.getType() ==
- * NodeModel.NODETYPE_CLIENT) {
- * client.setFix(false);
- * System.out.println("Client unfixed."); } else {
- * System.out.println("Position with client
- * deleted, but node with given name is not a
- * client!"); } } else {
- * System.out.println("Position with client
- * deleted, but no node found for it."); }
- */
- return;
- if (position.getAccessPoint() != null) {
- AccessPointNode ap = nodeModel.findAccessPoint(position.getAccessPoint().getMac());
- if (ap != null) {
- // AccessPoint wurde "frei" gemacht
- ap.setFix(false);
- System.out.println("Accesspoint unfixed.");
- } else
- System.out.println("Position with accesspoint deleted, but no node found for it.");
- return;
- }
+ if (position.getClient() == null && position.getAccessPoint() == null) {
+ if (node != null) {
+ // Referenzpunkt wird gel\xF6scht
+ if (node.getType() == NodeModelConstants.NODETYPE_LOCATION) // Aus dem lokalen Graphen entfernen das
+ // Ding
+ nodeModel.removeNode(node);
+ else
+ System.out
+ .println("Position with location information deleted, but node with given name is not a location!");
+ } else
+ System.out
+ .println("Position with location information deleted, but no node found for it.");
+ return;
+ }
+ if (position.getClient() != null) // Node client =
+ return;
+ if (position.getAccessPoint() != null) {
+ AccessPointNode ap = nodeModel.findAccessPoint(position.getAccessPoint().getMac());
+ if (ap != null) {
+ // AccessPoint wurde "frei" gemacht
+ ap.setFix(false);
+ System.out.println("Accesspoint unfixed.");
+ } else
+ System.out.println("Position with accesspoint deleted, but no node found for it.");
+ return;
+ }
+ System.out.println("Position with id " + position.getId()
+ + " was deleted but not handled.");
+ return;
+ } else {
+ // Neues Positionsobjekt oder altes wurde
+ // aktualisiert (Location)
+ if (position.getClient() == null && position.getAccessPoint() == null) {
+ handlePositionXYZ(node, nodeModel, position);
+ return;
+ }
+ if (position.getAccessPoint() != null) {
+ handleAccessPointXYZ(nodeModel, position);
+ return;
+ }
+ if (position.getClient() != null && position.getCharacter() != null) {
+ handleClientXYZ(nodeModel, position);
+ return;
+ }
+ }
+ System.out.println("Unbekannte Position. Kann nix anfangen damit.");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
- System.out.println("Position with id " + position.getId().longValue()
- + " was deleted but not handled.");
- return;
- } else {
- // Neues Positionsobjekt oder altes wurde
- // aktualisiert (Location)
- if (position.getClient() == null && position.getAccessPoint() == null) {
- // Referenzpunkt angelegt oder aktualisiert
- LocationNode location;
- if (node == null) {
- // Referenzpunkt bisher unbekannt
- location = new LocationNode(nodeModel);
+ /**
+ *
+ * @param node a node
+ * @param nodeModel the model
+ * @param position the position data
+ */
+ private void handlePositionXYZ(Node node, INodeModel nodeModel, PositionDTO position) {
+ // Referenzpunkt angelegt oder aktualisiert
+ LocationNode location;
+ if (node == null) {
+ // Referenzpunkt bisher unbekannt
+ location = new LocationNode(nodeModel);
- location.setId(position.getId().longValue());
- location.setName(position.getName());
- nodeModel.addNode(location);
+ location.setId(position.getId());
+ location.setName(position.getName());
+ nodeModel.addNode(location);
- if (position.getPosX().intValue() != -1 && position.getPosY().intValue() != -1) {
- location.setPosition(position.getPosX().intValue(), position.getPosY()
- .intValue(), position.getPosZ().intValue());
- location.setFix(true);
- } else
- location.setFix(false);
- // Signalcharakteristik auswerden und
- // gesehene
- // AccessPoints ebenfalls erzeugen bzw. mit
- // ihnen Verbindungen
- // herstellen
- SignalCharacterDTO sc = position.getCharacter();
- SimpleScanResultDTO[] sr = sc.getSimpleScanResults();
- for (int i = 0; sr != null && i < sr.length; i++) {
- SimpleScanResultDTO r = sr[i];
- String mac = r.getMacAP();
- // Gibt es ggf. einen AP mit der
- // Mac-Adresse?
- AccessPointNode ap = nodeModel.findAccessPoint(mac);
- if (ap == null) {
- // Nein
- ap = new AccessPointNode(nodeModel);
- ap.setMacAddress(mac);
- nodeModel.addNode(ap);
- // ap.setName(mac);
- }
- if (!ap.isHidden())
- location.seesAccessPoint(ap, r.getSignalLevel().doubleValue());
- }
- } else {
- System.out.println("Referenzpunkt verschoben.");
- // Referenzpunkt wird nur aktualisiert, wir
- // gehen davon aus
- // das sich nur die Position ver\xE4ndern darf
- // (die Programmlogik sieht
- // es jedenfalls so vor, \xC4ndern der APs
- // geschieht \xFCber L\xF6schen und
- // Neuanlegen)
- location = (LocationNode) node;
- location.setId(position.getId().longValue()); // Falls
- // nicht
- // gesetzt
- // Nur Position von fixierten
- // Orten/Referenzpunkten beachten
- if (position.isFixed()) {
- location.setPosition(position.getPosX().intValue(), position.getPosY()
- .intValue(), position.getPosZ().intValue());
- location.setFix(true);
- } else
- location.setFix(false);
- // Signalcharakteristik auswerden und
- // gesehene
- // AccessPoints ebenfalls erzeugen bzw. mit
- // ihnen Verbindungen
- // herstellen
- SignalCharacterDTO sc = position.getCharacter();
- SimpleScanResultDTO[] sr = sc.getSimpleScanResults();
- // Alle momentan gesehenen AccessPoints
- // merken
+ if (position.getPosX() != -1 && position.getPosY() != -1) {
+ location.setPosition(position.getPosX(), position.getPosY(), position.getPosZ());
+ location.setFix(true);
+ } else
+ location.setFix(false);
+ // Signalcharakteristik auswerden und
+ // gesehene
+ // AccessPoints ebenfalls erzeugen bzw. mit
+ // ihnen Verbindungen
+ // herstellen
+ SignalCharacterDTO sc = position.getCharacter();
+ SimpleScanResultDTO[] sr = sc.getSimpleScanResults();
+ for (int i = 0; sr != null && i < sr.length; i++) {
+ SimpleScanResultDTO r = sr[i];
+ String mac = r.getMacAP();
+ // Gibt es ggf. einen AP mit der
+ // Mac-Adresse?
+ AccessPointNode ap = nodeModel.findAccessPoint(mac);
+ if (ap == null) {
+ // Nein
+ ap = new AccessPointNode(nodeModel);
+ ap.setMacAddress(mac);
+ nodeModel.addNode(ap);
+ // ap.setName(mac);
+ }
+ if (!ap.isHidden())
+ location.seesAccessPoint(ap, r.getSignalLevel());
+ }
+ } else {
+ System.out.println("Referenzpunkt verschoben.");
+ // Referenzpunkt wird nur aktualisiert, wir
+ // gehen davon aus
+ // das sich nur die Position ver\xE4ndern darf
+ // (die Programmlogik sieht
+ // es jedenfalls so vor, \xC4ndern der APs
+ // geschieht \xFCber L\xF6schen und
+ // Neuanlegen)
+ location = (LocationNode) node;
+ location.setId(position.getId()); // Falls
+ // nicht
+ // gesetzt
+ // Nur Position von fixierten
+ // Orten/Referenzpunkten beachten
+ if (position.isFixed()) {
+ location.setPosition(position.getPosX(), position.getPosY(), position.getPosZ());
+ location.setFix(true);
+ } else
+ location.setFix(false);
+ // Signalcharakteristik auswerden und
+ // gesehene
+ // AccessPoints ebenfalls erzeugen bzw. mit
+ // ihnen Verbindungen
+ // herstellen
+ SignalCharacterDTO sc = position.getCharacter();
+ SimpleScanResultDTO[] sr = sc.getSimpleScanResults();
+ // Alle momentan gesehenen AccessPoints
+ // merken
- ArrayList seenAps = location.getSeenAccessPoints();
- for (int i = 0; i < sr.length; i++) {
- SimpleScanResultDTO r = sr[i];
- String mac = r.getMacAP();
- // Gibt es ggf. einen AP mit der
- // Mac-Adresse?
- AccessPointNode ap = nodeModel.findAccessPoint(mac);
- if (ap == null) {
- // Nein
- ap = new AccessPointNode(nodeModel);
- ap.setMacAddress(mac);
- nodeModel.addNode(ap);
- // ap.setName(mac);
- } else // AccessPoint nur aktualisieren?
- if (seenAps.remove(ap)) // Nur Signallevel aktualisieren
- location.setSignalLevelForAcessPoint(ap, r.getSignalLevel().doubleValue());
- else
- // Neu
- location.seesAccessPoint(ap, r.getSignalLevel().doubleValue());
- }
+ ArrayList seenAps = location.getSeenAccessPoints();
+ for (SimpleScanResultDTO r : sr) {
+ String mac = r.getMacAP();
+ // Gibt es ggf. einen AP mit der
+ // Mac-Adresse?
+ AccessPointNode ap = nodeModel.findAccessPoint(mac);
+ if (ap == null) {
+ // Nein
+ ap = new AccessPointNode(nodeModel);
+ ap.setMacAddress(mac);
+ nodeModel.addNode(ap);
+ // ap.setName(mac);
+ } else // AccessPoint nur aktualisieren?
+ if (seenAps.remove(ap)) // Nur Signallevel aktualisieren
+ location.setSignalLevelForAcessPoint(ap, r.getSignalLevel());
+ else
+ // Neu
+ location.seesAccessPoint(ap, r.getSignalLevel());
+ }
- // Alle APs aus seenAps werden demzufolge
- // nicht mehr gesehen und
- // dies teilen wir unserem Modell mit
- for (int i = 0; i < seenAps.size(); i++) {
- AccessPointNode ap = (AccessPointNode) seenAps.get(i);
- location.notSeesAccessPoint(ap);
- }
- }
- return;
- }
- if (position.getAccessPoint() != null) {
- System.out.println("Accesspointposition erzeugt oder aktualisiert.");
- AccessPointDTO apdto = position.getAccessPoint();
- AccessPointNode ap = nodeModel.findAccessPoint(apdto.getMac());
- if (ap == null) {
- // Gibt es noch nicht in unserem Modell =>
- // Schnell erzeugen
- ap = new AccessPointNode(nodeModel);
- ap.setMacAddress(apdto.getMac());
- nodeModel.addNode(ap);
- }
- ap.setId(position.getId().longValue());
- ap.setHiddenStatus(apdto.isHidden());
- // Nur Position von fixierten AccessPoints
- // beachten
- if (position.isFixed()) {
- // AccessPoint wurde fixiert
- ap.setPosition(position.getPosX().intValue(), position.getPosY().intValue(),
- position.getPosZ().intValue());
- ap.setFix(true);
- } else {
- // Loser AccessPoint gemeldet
- ap.setFix(false);
- System.out.println("Unfix accesspoint received. This was not in our contract.");
- }
- return;
- }
- // if (position.getGeoPoint() != null) {
- // GeoPointDTO gpdto = position.getGeoPoint();
- // GeoPosNode geoNode = (GeoPosNode)
- // nodeModel.findNode(gpdto.getPath());
- // if (geoNode == null) {
- // geoNode.setPosition(position.getPosX(),
- // position.getPosY());
- // geoNode.setFix(true);
- // }
- // }
- if (position.getClient() != null && position.getCharacter() != null) {
- // System.out.println("Clientposition erzeugt
- // oder aktualisiert f\xFCr Client " +
- // position.getClient().getName());
- ClientDTO clientdto = position.getClient();
- ClientNode client = (ClientNode) nodeModel.findNode(clientdto.getName());
+ // Alle APs aus seenAps werden demzufolge
+ // nicht mehr gesehen und
+ // dies teilen wir unserem Modell mit
+ for (Object seenAp : seenAps) {
+ AccessPointNode ap = (AccessPointNode) seenAp;
+ location.notSeesAccessPoint(ap);
+ }
+ }
+ }
- // Wenn eigener Client unfixiert kommt
- // Positionsangaben ignorieren
- if (client == PollHandler.this.controller.getClient() && !position.isFixed()) {
- // Aber noch schnell unfixieren
- client.setFix(false);
- System.out.println("Eigener Client wird ignoriert");
- return;
- } else if (client == PollHandler.this.controller.getClient() && position.isFixed())
- System.out.println("Eigener Client empfangen mit fixierter Position.");
+ /**
+ * Macht irgendwass
+ * @param nodeModel
+ * @param position
+ */
+ private void handleAccessPointXYZ(INodeModel nodeModel, PositionDTO position) {
+ System.out.println("Accesspointposition erzeugt oder aktualisiert.");
+ AccessPointDTO apdto = position.getAccessPoint();
+ AccessPointNode ap = nodeModel.findAccessPoint(apdto.getMac());
+ if (ap == null) {
+ // Gibt es noch nicht in unserem Modell =>
+ // Schnell erzeugen
+ ap = new AccessPointNode(nodeModel);
+ ap.setMacAddress(apdto.getMac());
+ nodeModel.addNode(ap);
+ }
+ ap.setId(position.getId());
+ ap.setHiddenStatus(apdto.isHidden());
+ // Nur Position von fixierten AccessPoints
+ // beachten
+ if (position.isFixed()) {
+ // AccessPoint wurde fixiert
+ ap.setPosition(position.getPosX(), position.getPosY(),
+ position.getPosZ());
+ ap.setFix(true);
+ } else {
+ // Loser AccessPoint gemeldet
+ ap.setFix(false);
+ System.out.println("Unfix accesspoint received. This was not in our contract.");
+ }
+ }
- // Sonst beachten wir alle Positionen die wir
- // bekommen
- if (client == null) {
- System.out.println("Neuer Client empfangen (" + clientdto.getMac() + ", "
- + clientdto.getName() + ". F\xFCge zum Graphen hinzu.");
- client = new ClientNode(nodeModel);
- client.setMacAddress(clientdto.getMac());
- client.setName(clientdto.getName());
- nodeModel.addNode(client);
- }
+ /**
+ * Macht igrnedwass!
+ * @param nodeModel
+ * @param position
+ */
+ private void handleClientXYZ(INodeModel nodeModel, PositionDTO position) {
+ ClientDTO clientdto = position.getClient();
+ ClientNode client = (ClientNode) nodeModel.findNode(clientdto.getName());
- System.out.println("Position f\xFCr Client " + client.getName() + " empfangen. fix = "
- + position.isFixed());
- // client.setPosition(position.getPosX().intValue(),
- // position.getPosY().intValue());
+ // Wenn eigener Client unfixiert kommt
+ // Positionsangaben ignorieren
+ if (client == this.controller.getClient() && !position.isFixed()) {
+ // Aber noch schnell unfixieren
+ client.setFix(false);
+ System.out.println("Eigener Client wird ignoriert");
+ return;
+ } else if (client == this.controller.getClient() && position.isFixed())
+ System.out.println("Eigener Client empfangen mit fixierter Position.");
- if (position.isFixed()) {
- // Client wurde fixiert
- client.setFix(true);
- client.setPosition(position.getPosX().intValue(), position.getPosY().intValue(),
- position.getPosZ().intValue());
- } else
- client.setFix(false);
- client.setId(position.getId().longValue());
+ // Sonst beachten wir alle Positionen die wir
+ // bekommen
+ if (client == null) {
+ System.out.println("Neuer Client empfangen (" + clientdto.getMac() + ", "
+ + clientdto.getName() + ". F\xFCge zum Graphen hinzu.");
+ client = new ClientNode(nodeModel);
+ client.setMacAddress(clientdto.getMac());
+ client.setName(clientdto.getName());
+ nodeModel.addNode(client);
+ }
- // Signalst\xE4rken usw. verwaltet der scannende
- // Client selbst
- if (client == PollHandler.this.controller.getClient()) return;
+ System.out.println("Position f\xFCr Client " + client.getName() + " empfangen. fix = "
+ + position.isFixed());
+ // client.setPosition(position.getPosX().intValue(),
+ // position.getPosY().intValue());
- // Signalcharakteristik auswerden und gesehene
- // AccessPoints ebenfalls erzeugen bzw. mit
- // ihnen Verbindungen
- // herstellen
- SignalCharacterD...
[truncated message content] |
|
From: <jan...@us...> - 2007-02-10 16:42:30
|
Revision: 529
http://svn.sourceforge.net/magicmap/?rev=529&view=rev
Author: jan_fride
Date: 2007-02-10 08:42:26 -0800 (Sat, 10 Feb 2007)
Log Message:
-----------
Menu is dynamic
Modified Paths:
--------------
trunk/magicmapclient/magicmapclient.iml
trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainGUI.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/MapPanel.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/View.java
trunk/magicmapclient/src/net/sf/magicmap/client/plugin/PluginLoader.java
trunk/magicmapserver/magicmapserver.iml
Added Paths:
-----------
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuAndPredicate.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuContainer.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuItem.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuNotPredicate.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuPredicate.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuTypePredicate.java
Modified: trunk/magicmapclient/magicmapclient.iml
===================================================================
--- trunk/magicmapclient/magicmapclient.iml 2007-02-10 14:27:24 UTC (rev 528)
+++ trunk/magicmapclient/magicmapclient.iml 2007-02-10 16:42:26 UTC (rev 529)
@@ -1,300 +1,302 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="true" type="JAVA_MODULE">
- <component name="ModuleRootManager" />
- <component name="NewModuleRootManager" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/build" />
- <exclude-output />
- <output-test url="file://$MODULE_DIR$/build-test" />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/inf" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/perl" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/.settings" />
- <excludeFolder url="file://$MODULE_DIR$/lib" />
- <excludeFolder url="file://$MODULE_DIR$/lib-dev" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="Groovy from GroovyJ 0.1.8 (Demetra)" level="application" />
- <orderEntry type="library" name="magicmap-server" level="application" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/nekohtml.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jaxrpc.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/concurrent.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-collections-3.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jaxen-1.1-beta-9.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/forms-1.0.5.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/xml-apis.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/activation.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jung-1.5.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/xmlParserAPIs.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/mail.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/derby.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/foxtrot.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-httpclient-3.0-rc3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/dom4j-1.6.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-discovery.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/RelativeLayout.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/saaj.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/log4j-1.2.8.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-logging.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/xercesImpl.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/looks-1.2.2.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/axis.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/ostermillerutils_1_05_00.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jpox-20041204.032009.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-codec-1.3.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/colt.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib/wsdl4j.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib-dev/axis-ant.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="jar://$MODULE_DIR$/lib-dev/junit.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntryProperties />
- </component>
- <component name="VcsManagerConfiguration">
- <option name="ACTIVE_VCS_NAME" value="svn" />
- <option name="USE_PROJECT_VCS" value="false" />
- </component>
-</module>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="false" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/build" />
+ <exclude-output />
+ <output-test url="file://$MODULE_DIR$/build-test" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/build" />
+ <excludeFolder url="file://$MODULE_DIR$/build-test" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://X:/maven/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/dom4j-1.6.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/forms-1.0.5.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/commons-collections-3.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/foxtrot.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/jaxrpc.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/ostermillerutils_1_05_00.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/commons-codec-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/concurrent.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/colt.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/nekohtml.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/commons-logging.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/jung-1.5.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/saaj.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/xmlParserAPIs.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/derby.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/RelativeLayout.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/xercesImpl.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/xml-apis.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/mail.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/jaxen-1.1-beta-9.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/commons-httpclient-3.0-rc3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/jpox-20041204.032009.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/looks-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/log4j-1.2.8.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/axis.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/activation.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/wsdl4j.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib/commons-discovery.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib-dev/junit.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library>
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/lib-dev/axis-ant.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module" module-name="magicmapserver" />
+ <orderEntryProperties />
+ </component>
+</module>
+
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainGUI.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainGUI.java 2007-02-10 14:27:24 UTC (rev 528)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/MainGUI.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -17,10 +17,7 @@
import net.sf.magicmap.client.gui.utils.GUIConstants;
import net.sf.magicmap.client.gui.utils.GUIUtils;
import net.sf.magicmap.client.gui.utils.MagicAction;
-import net.sf.magicmap.client.gui.views.ConsoleView;
-import net.sf.magicmap.client.gui.views.MapView;
-import net.sf.magicmap.client.gui.views.MeasurementView;
-import net.sf.magicmap.client.gui.views.OutlineView;
+import net.sf.magicmap.client.gui.views.*;
import net.sf.magicmap.client.interfaces.*;
import net.sf.magicmap.client.meta.MapInfo;
import net.sf.magicmap.client.meta.ServerConnectionInfo;
@@ -37,6 +34,10 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.rmi.RemoteException;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collection;
+import java.util.Set;
/**
* The main GUI window
@@ -69,7 +70,7 @@
if (MainGUI.mainGUI == null) MainGUI.mainGUI = new MainGUI();
return MainGUI.mainGUI;
}
-
+ private Map<String, JComponent> viewMap = new HashMap<String, JComponent>();
private JMenuBar menuBar;
private JToolBar toolBar;
private StatusPanel statusBar;
@@ -167,6 +168,12 @@
AttributeType.TOP, -5));
this.layout.addConstraint("mainpane", AttributeType.TOP, new AttributeConstraint("toolbar",
AttributeType.BOTTOM, GUIConstants.DIVIDER_SIZE));
+
+ viewMap.put("outlineView", outlineView);
+ viewMap.put("mapPanel", mapPanel);
+ viewMap.put("mapView", mapView);
+ viewMap.put("consoleView", consoleView);
+
}
/**
@@ -835,5 +842,10 @@
this.statusBar.setInvisible(Controller.getInstance().isInvisible());
Controller.getInstance().connect(MainGUI.this);
}
-
+ public JComponent getViewComponent(String name){
+ return viewMap.get(name);
+ }
+ public Set<String> getViewComponents(){
+ return viewMap.keySet();
+ }
}
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/MapPanel.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/MapPanel.java 2007-02-10 14:27:24 UTC (rev 528)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/MapPanel.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -327,23 +327,9 @@
this.renameAction.setEnabled(false);
this.propertiesAction.setEnabled(false);
menu.addSeparator();
- if (node instanceof InfoObjectNode) {
- final InfoObjectNode info = (InfoObjectNode) node;
- menu.add(new AbstractAction("Expandieren") {
- public void actionPerformed(ActionEvent arg0){
- try {
- info.setExpanded(!info.isExpanded());
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- });
-
- }
- return menu;
+ // aditilnal
+ return mapView.getMenuContainer().buildMenu(node, menu);
}
/*
Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuAndPredicate.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuAndPredicate.java (rev 0)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuAndPredicate.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -0,0 +1,23 @@
+package net.sf.magicmap.client.gui.utils.menu;
+
+import net.sf.magicmap.client.model.node.Node;
+
+/**
+ * Class ${class}
+ *
+ * @author jan
+ * @date 10.02.2007
+ */
+public class NodeMenuAndPredicate implements NodeMenuPredicate{
+ private final NodeMenuPredicate first;
+ private final NodeMenuPredicate second;
+
+ public NodeMenuAndPredicate (NodeMenuPredicate first, NodeMenuPredicate second){
+
+ this.first = first;
+ this.second = second;
+ }
+ public boolean show(Node node) {
+ return first.show(node) && second.show(node);
+ }
+}
Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuContainer.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuContainer.java (rev 0)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuContainer.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -0,0 +1,44 @@
+package net.sf.magicmap.client.gui.utils.menu;
+
+import net.sf.magicmap.client.model.node.Node;
+
+import javax.swing.*;
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * Class ${class}
+ *
+ * @author jan
+ * @date 10.02.2007
+ */
+public class NodeMenuContainer {
+
+ private final JComponent component;
+ private final List<NodeMenuItem> items = new LinkedList<NodeMenuItem>();
+ private final Set<NodeMenuItem> seperators = new HashSet<NodeMenuItem>();
+ public NodeMenuContainer(JComponent component){
+ this.component = component;
+ }
+
+ public void addNodeMenuItem(Object owner, JMenuItem item){
+ this.addNodeMenuItem(owner, item, NodeMenuPredicate.TRUE);
+ }
+ public void addNodeMenuItem(Object owner, JMenuItem item, NodeMenuPredicate predicate){
+ items.add(new NodeMenuItem(item, predicate));
+ }
+ public JPopupMenu buildMenu(Node node, JPopupMenu menu){
+ for (NodeMenuItem item: items){
+ if (item.showPredicate.show(node)){
+ menu.add(item.item);
+ }
+ }
+ return menu;
+ }
+
+ public void addSeperator() {
+ seperators.add(items.get(items.size()-1));
+ }
+}
Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuItem.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuItem.java (rev 0)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuItem.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -0,0 +1,19 @@
+package net.sf.magicmap.client.gui.utils.menu;
+
+import javax.swing.*;
+
+/**
+ * Class ${class}
+ *
+ * @author jan
+ * @date 10.02.2007
+ */
+public class NodeMenuItem {
+ public final JMenuItem item;
+ public final NodeMenuPredicate showPredicate;
+
+ public NodeMenuItem(JMenuItem item, NodeMenuPredicate predicate){
+ this.item = item;
+ this. showPredicate = predicate;
+ }
+}
Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuNotPredicate.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuNotPredicate.java (rev 0)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuNotPredicate.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -0,0 +1,21 @@
+package net.sf.magicmap.client.gui.utils.menu;
+
+import net.sf.magicmap.client.model.node.Node;
+
+/**
+ * Class ${class}
+ *
+ * @author jan
+ * @date 10.02.2007
+ */
+public class NodeMenuNotPredicate implements NodeMenuPredicate{
+ private final NodeMenuPredicate other;
+
+ public NodeMenuNotPredicate(NodeMenuPredicate other){
+
+ this.other = other;
+ }
+ public boolean show(Node node) {
+ return !other.show(node);
+ }
+}
Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuPredicate.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuPredicate.java (rev 0)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuPredicate.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -0,0 +1,26 @@
+package net.sf.magicmap.client.gui.utils.menu;
+
+import net.sf.magicmap.client.model.node.Node;
+
+/**
+ * Class ${class}
+ *
+ * @author jan
+ * @date 10.02.2007
+ */
+public interface NodeMenuPredicate {
+
+ public boolean show(Node node);
+
+ static final NodeMenuPredicate TRUE = new NodeMenuPredicate() {
+ public boolean show(Node node) {
+ return true;
+ }
+ };
+
+ static final NodeMenuPredicate FALSE = new NodeMenuPredicate() {
+ public boolean show(Node node) {
+ return false;
+ }
+ };
+}
Added: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuTypePredicate.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuTypePredicate.java (rev 0)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/menu/NodeMenuTypePredicate.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -0,0 +1,21 @@
+package net.sf.magicmap.client.gui.utils.menu;
+
+import net.sf.magicmap.client.model.node.Node;
+
+/**
+ * Class ${class}
+ *
+ * @author jan
+ * @date 10.02.2007
+ */
+public class NodeMenuTypePredicate implements NodeMenuPredicate{
+ private final int type;
+
+ public NodeMenuTypePredicate(int type){
+
+ this.type = type;
+ }
+ public boolean show(Node node) {
+ return node != null && node.getType() == type;
+ }
+}
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/View.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/View.java 2007-02-10 14:27:24 UTC (rev 528)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/views/View.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -7,6 +7,7 @@
import javax.swing.JComponent;
import com.jgoodies.uif_lite.panel.SimpleInternalFrame;
+import net.sf.magicmap.client.gui.utils.menu.NodeMenuContainer;
/**
* Beliebiger View im PACW Client. Ein View greift auf ein Modell
@@ -19,9 +20,10 @@
public abstract class View extends SimpleInternalFrame {
private JComponent view;
+ private final NodeMenuContainer menuCOntainer = new NodeMenuContainer(this);
+
+ //private ViewHeader header;
- //private ViewHeader header;
-
public View() {
super("Bla");
this.setTitle(getName());
@@ -53,4 +55,7 @@
return new ViewHeader(getName());
}
+ public NodeMenuContainer getMenuContainer(){
+ return menuCOntainer;
+ }
}
\ No newline at end of file
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/plugin/PluginLoader.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/plugin/PluginLoader.java 2007-02-10 14:27:24 UTC (rev 528)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/plugin/PluginLoader.java 2007-02-10 16:42:26 UTC (rev 529)
@@ -68,6 +68,7 @@
}
}
} catch (Exception e) {
+ log.warn("Invalid plugin directory: " + url.toString());
brokenUrlList.add(url);
}
}
Modified: trunk/magicmapserver/magicmapserver.iml
===================================================================
--- trunk/magicmapserver/magicmapserver.iml 2007-02-10 14:27:24 UTC (rev 528)
+++ trunk/magicmapserver/magicmapserver.iml 2007-02-10 16:42:26 UTC (rev 529)
@@ -1,24 +1,307 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<modul...
[truncated message content] |
|
From: <fle...@us...> - 2007-04-11 14:38:20
|
Revision: 647
http://svn.sourceforge.net/magicmap/?rev=647&view=rev
Author: flederohr
Date: 2007-04-11 07:37:55 -0700 (Wed, 11 Apr 2007)
Log Message:
-----------
compile project with Java 1.5 compatibility
Modified Paths:
--------------
trunk/magicmapclient/MagicMapSetup.nsi
trunk/magicmapclient/build.xml
trunk/magicmapserver/build.xml
Modified: trunk/magicmapclient/MagicMapSetup.nsi
===================================================================
--- trunk/magicmapclient/MagicMapSetup.nsi 2007-04-02 13:46:38 UTC (rev 646)
+++ trunk/magicmapclient/MagicMapSetup.nsi 2007-04-11 14:37:55 UTC (rev 647)
@@ -7,7 +7,7 @@
# Defines
!define REGKEY "SOFTWARE\$(^Name)"
-!define VERSION 0.8.1
+!define VERSION 0.9.0
!define COMPANY "Humboldt Universit\xE4t zu Berlin"
!define URL http://www2.informatik.hu-berlin.de/rok/MagicMap
@@ -69,6 +69,8 @@
File MagicMap.ico
File magicmap.jar
File LICENSE.txt
+ SetOutPath $INSTDIR\plugins
+ File /r /x .svn plugins\*
SetOutPath $INSTDIR\lib
File /r /x .svn lib\*
File ..\magicmapserver\dist\magicmap-server.jar
Modified: trunk/magicmapclient/build.xml
===================================================================
--- trunk/magicmapclient/build.xml 2007-04-02 13:46:38 UTC (rev 646)
+++ trunk/magicmapclient/build.xml 2007-04-11 14:37:55 UTC (rev 647)
@@ -94,7 +94,7 @@
</target>
<target name="compile" depends="axis">
- <javac destdir="${build}" debug="true" deprecation="true" debuglevel="lines,vars,source" fork="true">
+ <javac destdir="${build}" target="1.5" debug="true" deprecation="true" debuglevel="lines,vars,source" fork="true">
<classpath refid="build.classpath" />
<src path="${src}" />
<src path="${src.gen}" />
Modified: trunk/magicmapserver/build.xml
===================================================================
--- trunk/magicmapserver/build.xml 2007-04-02 13:46:38 UTC (rev 646)
+++ trunk/magicmapserver/build.xml 2007-04-11 14:37:55 UTC (rev 647)
@@ -32,6 +32,7 @@
<target name="compile" depends="prepare">
<javac destdir="${build}"
+ target="1.5"
debug="true"
deprecation="true"
debuglevel="lines,vars,source"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jan...@us...> - 2008-01-02 18:15:00
|
Revision: 710
http://magicmap.svn.sourceforge.net/magicmap/?rev=710&view=rev
Author: jan_fride
Date: 2008-01-02 10:14:57 -0800 (Wed, 02 Jan 2008)
Log Message:
-----------
Improved Os X Look.
Modified Paths:
--------------
trunk/magicmapclient/build.xml
trunk/magicmapclient/magicmapclient.iml
trunk/magicmapclient/src/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java
trunk/magicmapclient/src/edu/uci/ics/jung/visualization/VisualizationViewer.java
trunk/magicmapclient/src/net/sf/magicmap/client/core/MagicMapApplication.java
trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/GUIUtils.java
trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INode.java
trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INodeModel.java
trunk/magicmapclient/src/net/sf/magicmap/client/model/node/Node.java
trunk/magicmapserver/magicmapserver.iml
Added Paths:
-----------
trunk/magicmapclient/lib/looks-2.1.4.jar
Modified: trunk/magicmapclient/build.xml
===================================================================
--- trunk/magicmapclient/build.xml 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/build.xml 2008-01-02 18:14:57 UTC (rev 710)
@@ -8,7 +8,7 @@
<property name="main.class" value="net.sf.magicmap.client.core.MagicMapApplication" />
<!-- Setting for maven path-->
- <property name="maven.home" value="D:\_development\_Tools\maven-2.0.5"/>
+ <property name="maven.home" value="/usr/local/maven"/>
@@ -156,7 +156,7 @@
<!-- Setting for maven path must be checked.-->
<target name="maven-install">
- <exec executable="${maven.home}/bin/mvn.bat">
+ <exec executable="${maven.home}/bin/mvn">
<arg value="install:install-file"/>
<arg value="-Dfile=magicmap.jar"/>
<arg value="-DgroupId=net.sf.magicmap"/>
Added: trunk/magicmapclient/lib/looks-2.1.4.jar
===================================================================
(Binary files differ)
Property changes on: trunk/magicmapclient/lib/looks-2.1.4.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/magicmapclient/magicmapclient.iml
===================================================================
--- trunk/magicmapclient/magicmapclient.iml 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/magicmapclient.iml 2008-01-02 18:14:57 UTC (rev 710)
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="false" type="JAVA_MODULE">
- <component name="ModuleRootManager" />
- <component name="NewModuleRootManager" inherit-compiler-output="false">
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
<output url="file://$MODULE_DIR$/build" />
<exclude-output />
<output-test url="file://$MODULE_DIR$/build-test" />
@@ -9,35 +8,34 @@
<sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src-gen" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/build" />
- <excludeFolder url="file://$MODULE_DIR$/build-test" />
- <excludeFolder url="file://$MODULE_DIR$/target" />
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="false" />
</content>
- <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://X:/maven/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+ <root url="jar://$MODULE_DIR$/../magicmapserver/dist/magicmap-server.jar!/" />
</CLASSES>
<JAVADOC />
- <SOURCES />
+ <SOURCES>
+ <root url="file://$MODULE_DIR$/../magicmapserver/src" />
+ </SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/dom4j-1.6.1.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/commons-httpclient-3.0-rc3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="inheritedJdk" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/forms-1.0.5.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/colt.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -55,7 +53,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/foxtrot.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/concurrent.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -64,7 +62,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jaxrpc.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/xercesImpl.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -73,7 +71,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/ostermillerutils_1_05_00.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/xml-apis.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -82,7 +80,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-codec-1.3.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/xmlParserAPIs.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -91,7 +89,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/concurrent.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/RelativeLayout.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -100,7 +98,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/colt.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/forms-1.0.5.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -109,7 +107,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/nekohtml.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/activation.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -118,7 +116,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-logging.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/mail.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -127,7 +125,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jung-1.5.2.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/commons-discovery.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -136,7 +134,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/saaj.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/commons-logging.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -145,7 +143,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/xmlParserAPIs.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/jaxrpc.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -154,7 +152,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/derby.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/saaj.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -163,7 +161,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/RelativeLayout.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/wsdl4j.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -172,7 +170,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/xercesImpl.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/axis.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -181,7 +179,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/xml-apis.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/jung-1.5.2.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -190,7 +188,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/mail.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/derby.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -199,7 +197,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jaxen-1.1-beta-9.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/jpox-20041204.032009.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -208,7 +206,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-httpclient-3.0-rc3.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/log4j-1.2.8.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -217,7 +215,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/jpox-20041204.032009.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/ostermillerutils_1_05_00.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -226,7 +224,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/looks-1.2.2.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/dom4j-1.6.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -235,7 +233,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/log4j-1.2.8.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/commons-codec-1.3.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -244,7 +242,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/axis.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/jaxen-1.1-beta-9.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -253,7 +251,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/activation.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/foxtrot.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -262,7 +260,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/wsdl4j.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/nekohtml.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -271,15 +269,6 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib/commons-discovery.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
<root url="jar://$MODULE_DIR$/lib-dev/junit.jar!/" />
</CLASSES>
<JAVADOC />
@@ -289,13 +278,12 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib-dev/axis-ant.jar!/" />
+ <root url="jar://$MODULE_DIR$/lib/looks-2.1.4.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module" module-name="magicmapserver" />
<orderEntryProperties />
</component>
</module>
Modified: trunk/magicmapclient/src/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java
===================================================================
--- trunk/magicmapclient/src/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/com/jgoodies/uif_lite/panel/SimpleInternalFrame.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -30,30 +30,13 @@
package com.jgoodies.uif_lite.panel;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.GradientPaint;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Insets;
-import java.awt.LayoutManager;
-import java.awt.Paint;
+import com.jgoodies.looks.LookUtils;
+import net.sf.magicmap.client.gui.utils.ShadowBorder;
-import javax.swing.BorderFactory;
-import javax.swing.Icon;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JToolBar;
-import javax.swing.SwingConstants;
-import javax.swing.UIManager;
+import javax.swing.*;
import javax.swing.border.AbstractBorder;
+import java.awt.*;
-import net.sf.magicmap.client.gui.utils.ShadowBorder;
-
-import com.jgoodies.plaf.LookUtils;
-
/**
* A <code>JPanel</code> subclass that has a drop shadow border and
* that provides a header with icon, title and tool bar.<p>
Modified: trunk/magicmapclient/src/edu/uci/ics/jung/visualization/VisualizationViewer.java
===================================================================
--- trunk/magicmapclient/src/edu/uci/ics/jung/visualization/VisualizationViewer.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/edu/uci/ics/jung/visualization/VisualizationViewer.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -24,7 +24,6 @@
import java.awt.geom.AffineTransform;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import javax.swing.JPanel;
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/core/MagicMapApplication.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/core/MagicMapApplication.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/core/MagicMapApplication.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -22,11 +22,16 @@
/**
* Main entry point for the whole client
- *
+ *
* @param args
*/
public static void main(String[] args){
Settings.setup(args);
+ // set this before the first window.....
+ if (GUIUtils.isOsX()) {
+ System.setProperty("apple.laf.useScreenMenuBar", "true");
+ System.setProperty("com.apple.mrj.application.apple.menu.about.name", "MagicMap");
+ }
JWindow splashScreen = new JWindow();
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/GUIUtils.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/GUIUtils.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/gui/utils/GUIUtils.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -5,32 +5,23 @@
package net.sf.magicmap.client.gui.utils;
-import java.awt.Dimension;
-import java.awt.Window;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import com.jgoodies.looks.Options;
+import com.jgoodies.looks.plastic.Plastic3DLookAndFeel;
+import com.jgoodies.looks.plastic.PlasticLookAndFeel;
+import com.jgoodies.looks.plastic.theme.ExperienceBlue;
+import net.sf.magicmap.client.gui.MainGUI;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.SwingConstants;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
+import javax.swing.*;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.metal.MetalLookAndFeel;
+import java.awt.*;
+import java.util.*;
-import net.sf.magicmap.client.gui.MainGUI;
+import apple.laf.AquaLookAndFeel;
-import com.jgoodies.plaf.FontSizeHints;
-import com.jgoodies.plaf.Options;
-import com.jgoodies.plaf.plastic.Plastic3DLookAndFeel;
-import com.jgoodies.plaf.plastic.theme.ExperienceBlue;
-
/**
* @author msc
- *
+ *
*/
public class GUIUtils {
@@ -39,22 +30,44 @@
private static Map<String, ResourceBundle> bundles = null;
public static void setPlasticLookAndFeel(){
+
try {
- UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
+ if (!isOsX()) {
+ UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
+
+ } else {
+ UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+ }
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
+ } catch (IllegalAccessException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ } catch (InstantiationException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ } catch (ClassNotFoundException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
- UIManager.put("Application.useSystemFontSettings", Boolean.TRUE);
- UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
- UIManager.put(com.jgoodies.plaf.Options.DEFAULT_ICON_SIZE_KEY, new Dimension(18, 18));
- Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
- // PlasticLookAndFeel.setFontSizeHints(FontSizeHints.SYSTEM);
- MetalLookAndFeel.setCurrentTheme(new ExperienceBlue());
- Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
+ if (!isOsX()) {
+ UIManager.put("Application.useSystemFontSettings", Boolean.TRUE);
+ UIManager.put(Options.USE_SYSTEM_FONTS_APP_KEY, Boolean.TRUE);
+ //UIManager.put(com.jgoodies.plaf.Options.DEFAULT_ICON_SIZE_KEY, new Dimension(18, 18));
+ // Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
+ // PlasticLookAndFeel.setFontSizeHints(FontSizeHints.SYSTEM);
+ MetalLookAndFeel.setCurrentTheme(new ExperienceBlue());
+ //Options.setGlobalFontSizeHints(FontSizeHints.MIXED);
+ } else {
+ System.setProperty("apple.laf.useScreenMenuBar", "true");
+ System.setProperty("com.apple.mrj.application.apple.menu.about.name", "MagicMap");
+ }
}
+ public static boolean isOsX() {
+ String lcOSName = System.getProperty("os.name").toLowerCase();
+ return lcOSName.startsWith("mac os x");
+ }
+
public static void locateOnScreen(Window frame){
Dimension paneSize = frame.getSize();
Dimension screenSize = frame.getToolkit().getScreenSize();
@@ -155,14 +168,14 @@
return JOptionPane.showOptionDialog(MainGUI.getInstance().getMainFrame(), GUIUtils.i18n("serverresponse")
+ "\n" + message, GUIUtils.i18n("authentificationerror"), JOptionPane.OK_CANCEL_OPTION,
JOptionPane.ERROR_MESSAGE, null, new String[]{GUIUtils.i18n("retry"), GUIUtils.i18n("no")}, GUIUtils
- .i18n("retry")) == JOptionPane.YES_OPTION;
+ .i18n("retry")) == JOptionPane.YES_OPTION;
}
public static boolean showConnectionError(){
return JOptionPane.showOptionDialog(MainGUI.getInstance().getMainFrame(), GUIUtils
.i18n("connectionsproblemsreconnect"), GUIUtils.i18n("connectionproblems"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE, null, new String[]{GUIUtils.i18n("yes"),
- GUIUtils.i18n("no")}, GUIUtils.i18n("yes")) == JOptionPane.YES_OPTION;
+ GUIUtils.i18n("no")}, GUIUtils.i18n("yes")) == JOptionPane.YES_OPTION;
}
public static void showErrorDialog(String message){
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INode.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INode.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INode.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -3,15 +3,19 @@
import java.util.List;
/**
- * Created by IntelliJ IDEA.
- * User: Jan
- * Date: 08.02.2007
- * Time: 09:22:33
- * To change this template use File | Settings | File Templates.
+ * <p>
+ * Interface for all nodes.
+ * </p>
+ * @author Jan Friderici
*/
public interface INode {
- String getDisplayName();
+ /**
+ *
+ * @return
+ */
+ String getDisplayName();
+
void setDisplayName(String displayName);
boolean isUpdate();
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INodeModel.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INodeModel.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/model/node/INodeModel.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -24,13 +24,13 @@
*
* @param node the node to add
*/
- public abstract void addNode(Node node);
+ void addNode(Node node);
/**
* Remove a node
* @param node removes a node from the model
*/
- public abstract void removeNode(Node node);
+ void removeNode(Node node);
/**
* Notifies all listeners that the state of a given node
@@ -42,7 +42,7 @@
* @param data new data, may be null.
* @see NodeModelListener
*/
- public abstract void updateNode(Node node, int type, Object data);
+ void updateNode(Node node, int type, Object data);
/**
* Aktualisiert den Hash-Schl\xFCssel f\xFCr einen Knoten.
@@ -51,7 +51,7 @@
* @param node Knoten der aktualisiert werden soll
* @param name Alter Hash-Wert
*/
- public abstract void rehashNode(Node node, String name);
+ void rehashNode(Node node, String name);
/**
* returns all neighbours for the given node.
@@ -59,7 +59,7 @@
* @param node the node
* @return all neighbours of the given node.
*/
- public abstract ArrayList<? extends Node> findNeighbors(Node node);
+ ArrayList<? extends Node> findNeighbors(Node node);
/**
* what for?
@@ -67,27 +67,27 @@
* @return
*/
@Deprecated
- public abstract ArrayList<? extends Node> findNonNeighbors(Node node);
+ ArrayList<? extends Node> findNonNeighbors(Node node);
/**
* Adds a NodeModelListener
* @param nodeModelListener the list\xE9ner to add.
*/
- public abstract void addNodeModelListener(NodeModelListener nodeModelListener);
+ void addNodeModelListener(NodeModelListener nodeModelListener);
/**
* remove a NodeModelListener
* @param l the listener to remove
*/
- public abstract void removeNodeModelListener(NodeModelListener l);
+ void removeNodeModelListener(NodeModelListener l);
/**
* returns an array of all NodeModelListener.
* @return an array of all NodeModelListener registered to this model.
*/
- public abstract NodeModelListener[] nodeModelListeners();
+ NodeModelListener[] nodeModelListeners();
- public Set<AccessPointSeerNode> getAccessPointSeerNodes();
+ Set<AccessPointSeerNode> getAccessPointSeerNodes();
/**
*
Modified: trunk/magicmapclient/src/net/sf/magicmap/client/model/node/Node.java
===================================================================
--- trunk/magicmapclient/src/net/sf/magicmap/client/model/node/Node.java 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapclient/src/net/sf/magicmap/client/model/node/Node.java 2008-01-02 18:14:57 UTC (rev 710)
@@ -104,6 +104,12 @@
this.id = -1;
}
+ /**
+ * <p>the name to display in the gui.</p>
+ * <p>The default value is the nodes name.</p>
+ *
+ * @return the display name for this node.
+ */
public String getDisplayName(){
if (this.displayName == null) {
return this.name;
@@ -112,23 +118,43 @@
}
}
+ /**
+ * <p>Set the name to display.</p>
+ * @param displayName the new name.
+ */
public void setDisplayName(String displayName){
this.displayName = displayName;
}
+ /**
+ * TODO what does this mean?
+ * @return
+ */
public boolean isUpdate(){
return update;
}
+ /**
+ * TODO !?
+ * @param newupdate
+ */
public void setUpdate(boolean newupdate){
this.update = newupdate;
this.model.updateNode(this, NodeModel.UPDATE_RESCAN, null);
}
+ /**
+ *
+ * @return
+ */
public boolean isFix(){
return fix;
}
+ /**
+ *
+ * @param fix
+ */
public void setFix(boolean fix){
this.fix = fix;
this.model.updateNode(this, NodeModel.UPDATE_FIXSTATE, null);
@@ -152,12 +178,24 @@
return y;
}
+ /**
+ * Move the node without notifying.
+ * @param x
+ * @param y
+ * @param z
+ */
public void setPositionSilent(int x, int y, int z){
this.x = x;
this.y = y;
this.z = z;
}
+ /**
+ * Move this node an notify.
+ * @param x
+ * @param y
+ * @param z
+ */
public void setPosition(int x, int y, int z){
setPositionSilent(x, y, z);
model.updateNode(this, NodeModel.UPDATE_POSITION, null);
@@ -165,6 +203,10 @@
public abstract ArrayList<? extends Node> getNeighbors();
+ /**
+ * The model this node belongs to
+ * @return
+ */
public INodeModel getModel(){
return model;
}
@@ -179,6 +221,10 @@
return internal;
}
+ /**
+ *
+ * @return
+ */
public long getId(){
return id;
}
@@ -199,10 +245,19 @@
return parentNode;
}
+ /**
+ * Set the parent node.
+ * @param parentNode
+ */
public void setParentNode(Node parentNode){
this.parentNode = parentNode;
}
+
+ /**
+ * Ask if this node is a physical or information node.
+ * @return
+ */
public boolean isPhysical(){
return physical;
}
Modified: trunk/magicmapserver/magicmapserver.iml
===================================================================
--- trunk/magicmapserver/magicmapserver.iml 2008-01-01 23:17:35 UTC (rev 709)
+++ trunk/magicmapserver/magicmapserver.iml 2008-01-02 18:14:57 UTC (rev 710)
@@ -1,22 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="false" type="JAVA_MODULE">
- <component name="ModuleRootManager" />
- <component name="NewModuleRootManager" inherit-compiler-output="false">
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="web" name="Web">
+ <configuration>
+ <descriptors>
+ <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" optional="false" version="2.5" />
+ </descriptors>
+ <webroots>
+ <root url="file://$MODULE_DIR$/web" relative="/" />
+ </webroots>
+ <building>
+ <setting name="EXPLODED_URL" value="file://" />
+ <setting name="EXPLODED_ENABLED" value="false" />
+ <setting name="JAR_URL" value="file://" />
+ <setting name="JAR_ENABLED" value="false" />
+ <setting name="BUILD_MODULE_ON_FRAME_DEACTIVATION" value="false" />
+ <setting name="BUILD_EXTERNAL_DEPENDENCIES" value="false" />
+ <setting name="EXCLUDE_EXPLODED_DIRECTORY" value="true" />
+ <setting name="RUN_JASPER_VALIDATION" value="true" />
+ <setting name="BUILD_ONLY_WEB_RESOURCES" value="false" />
+ </building>
+ <packaging>
+ <containerElement type="module" name="magicmapserver">
+ <attribute name="method" value="1" />
+ <attribute name="URI" value="/WEB-INF/classes" />
+ </containerElement>
+ </packaging>
+ </configuration>
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
<output url="file://$MODULE_DIR$/target/classes" />
<exclude-output />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/dblayer/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/target" />
</content>
- <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="inheritedJdk" />
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://X:/maven/junit/junit/3.8.1/junit-3.8.1.jar!/" />
+ <root url="jar://$MODULE_DIR$/web/WEB-INF/lib/log4j-1.2.8.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
@@ -25,7 +51,7 @@
<orderEntry type="module-library">
<library>
<CLASSES>
- <root url="jar://$MODULE_DIR$/lib.dev/jasper-runtime.jar!/" />
+ <root url="jar://$MODULE_DIR$/web/WEB-INF/lib/jpox-20041204.032009.jar!/"...
[truncated message content] |