Changeset b0b7d550cde18a78889e74482730fa3519cf8c2d

Show
Ignore:
Timestamp:
02/25/07 10:49:12 (2 years ago)
Author:
Christopher Jung <bktheg@web.de>
git-committer:
Christopher Jung <bktheg@web.de> 1172396952 +0100
git-parent:

[44f4abf99b9d7355fdb26123ac777f60ce1caa26]

git-author:
Christopher Jung <bktheg@web.de> 1172396952 +0100
Message:

Einige Warnungen gefixt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • clients/jstarmap/net/driftingsouls/ds2/framework/aWindowEntry.java

    re5910b8 rb0b7d55  
    3535 */ 
    3636class aWindowEntry { 
    37         public static final int VISIBILITY_OFF = 1; 
    38         public static final int VISIBILITY_ON = 2; 
    39         public static final int VISIBILITY_FORCE_OFF = 5; 
    40         public static final int VISIBILITY_FORCE_ON = 6; 
    41         public static final int VISIBILITY_FORCE = 4; 
     37        static final int VISIBILITY_OFF = 1; 
     38        static final int VISIBILITY_ON = 2; 
     39        static final int VISIBILITY_FORCE_OFF = 5; 
     40        static final int VISIBILITY_FORCE_ON = 6; 
     41        static final int VISIBILITY_FORCE = 4; 
    4242         
    4343        private int visibility; 
     
    6464        private boolean redraw; 
    6565         
    66         public aWindowEntry( CanvasWindowManager sm, JWindow aWindow, JWindow aParent ) { 
     66        aWindowEntry( CanvasWindowManager sm, JWindow aWindow, JWindow aParent ) { 
    6767                visibility = VISIBILITY_OFF; 
    6868                window = aWindow; 
     
    8484        } 
    8585         
    86         public int getVisibility() { 
     86        int getVisibility() { 
    8787                return visibility; 
    8888        } 
    8989         
    90         public void setVisibility( int vis ) { 
     90        void setVisibility( int vis ) { 
    9191                visibility = vis; 
    9292                 
     
    104104        } 
    105105         
    106         public JWindow getWindow() { 
     106        JWindow getWindow() { 
    107107                return window; 
    108108        } 
    109109         
    110         public JWindow getParent() { 
     110        JWindow getParent() { 
    111111                return parent; 
    112112        } 
    113113         
    114         public Shape getShape() { 
     114        Shape getShape() { 
    115115                return shape; 
    116116        } 
    117117         
    118         public void setShape( Shape ashape ) { 
     118        void setShape( Shape ashape ) { 
    119119                shape = ashape; 
    120120        } 
    121121         
    122         public Rectangle getWindowRect() { 
     122        Rectangle getWindowRect() { 
    123123                return windowRect; 
    124124        } 
    125125         
    126         public void setWindowRect(Rectangle rect) { 
     126        void setWindowRect(Rectangle rect) { 
    127127                windowRect = rect; 
    128128        } 
    129129         
    130         public Rectangle getClientRect() { 
     130        Rectangle getClientRect() { 
    131131                return clientWindowRect; 
    132132        } 
    133133         
    134         public void setClientRect(Rectangle rect) { 
     134        void setClientRect(Rectangle rect) { 
    135135                clientWindowRect = rect; 
    136136        } 
    137137         
    138         public Rectangle getVirtualClientRect() { 
     138        Rectangle getVirtualClientRect() { 
    139139                return virtualClientWindowRect; 
    140140        } 
    141141         
    142         public void setVirtualClientRect(Rectangle rect) { 
     142        void setVirtualClientRect(Rectangle rect) { 
    143143                virtualClientWindowRect = rect; 
    144144        } 
    145145         
    146         public Rectangle getMinimalVirtualClientRect() { 
     146        Rectangle getMinimalVirtualClientRect() { 
    147147                return minVirtualClientWindowRect; 
    148148        } 
    149149         
    150         public void setMinimalVirtualClientRect(Rectangle rect) { 
     150        void setMinimalVirtualClientRect(Rectangle rect) { 
    151151                minVirtualClientWindowRect = rect; 
    152152        } 
    153153         
    154         public Rectangle getBorderSize() { 
     154        Rectangle getBorderSize() { 
    155155                return borderSize; 
    156156        } 
    157157         
    158         public void setBorderSize(Rectangle rect) { 
     158        void setBorderSize(Rectangle rect) { 
    159159                borderSize = rect; 
    160160        } 
    161161         
    162         public int getScrollBarHandle() { 
     162        int getScrollBarHandle() { 
    163163                return scrollBarHandle; 
    164164        } 
    165165         
    166         public void setScrollBarHandle( int handle ) { 
     166        void setScrollBarHandle( int handle ) { 
    167167                scrollBarHandle = handle; 
    168168        } 
    169169         
    170         public Point getWindowPosition() { 
     170        Point getWindowPosition() { 
    171171                return windowPosition; 
    172172        } 
    173173         
    174         public Point getRelativeWindowPosition() {             
     174        Point getRelativeWindowPosition() {            
    175175                return windowRelativePosition; 
    176176        } 
    177177         
    178         public void setWindowRelativePosition( Point p ) { 
     178        void setWindowRelativePosition( Point p ) { 
    179179                windowRelativePosition = p; 
    180180        } 
    181181         
    182         public void setWindowPosition( Point p ) { 
     182        void setWindowPosition( Point p ) { 
    183183                windowPosition = p; 
    184184        } 
    185185         
    186         public int getWindowPositionMode() { 
     186        int getWindowPositionMode() { 
    187187                return windowPositionMode; 
    188188        } 
    189189         
    190         public void setWindowPositionMode( int mode ) { 
     190        void setWindowPositionMode( int mode ) { 
    191191                windowPositionMode = mode; 
    192192        } 
    193193         
    194         public Rectangle getVisibleClientRect() { 
     194        Rectangle getVisibleClientRect() { 
    195195                Rectangle rect = new Rectangle( windowPosition.x+borderSize.x, 
    196196                                                                                windowPosition.y+borderSize.y, 
     
    200200        } 
    201201         
    202         public int mapX( int absX ) { 
     202        int mapX( int absX ) { 
    203203                absX -= windowPosition.x; 
    204204                absX -= borderSize.x; 
     
    207207        } 
    208208         
    209         public int mapY( int absY ) { 
     209        int mapY( int absY ) { 
    210210                absY -= windowPosition.y; 
    211211                absY -= borderSize.y; 
     
    231231        } 
    232232         
    233         public int getVScrollOffset() { 
     233        int getVScrollOffset() { 
    234234                return vScrollOffset; 
    235235        } 
    236236         
    237         public void setVScrollOffset( int offset ) { 
     237        void setVScrollOffset( int offset ) { 
    238238                vScrollOffset = offset; 
    239239        } 
    240240         
    241         public boolean isScrollable() { 
     241        boolean isScrollable() { 
    242242                return enableScrolling; 
    243243        } 
    244244         
    245         public void setScrollable( boolean scroll ) { 
     245        void setScrollable( boolean scroll ) { 
    246246                enableScrolling = scroll; 
    247247        } 
    248248         
    249         public void setOffscreenBuffer( BufferedImage img ) { 
     249        void setOffscreenBuffer( BufferedImage img ) { 
    250250                offscreenBuffer = img; 
    251251        } 
    252252         
    253         public BufferedImage getOffscreenBuffer() { 
     253        BufferedImage getOffscreenBuffer() { 
    254254                return offscreenBuffer; 
    255255        } 
    256256         
    257         public boolean getRedrawStatus() { 
     257        boolean getRedrawStatus() { 
    258258                return redraw; 
    259259        } 
    260260         
    261         public void setRedrawStatus( boolean redraw ) { 
     261        void setRedrawStatus( boolean redraw ) { 
    262262                this.redraw = redraw; 
    263263        } 
  • clients/jstarmap/net/driftingsouls/ds2/framework/services/MapConnector.java

    re5910b8 rb0b7d55  
    5252 */ 
    5353public class MapConnector implements ServerConnectable { 
     54        /** 
     55         * Der Service-Name 
     56         */ 
    5457        public static final String SERVICE = MapConnector.class.getName(); 
    5558         
     
    5760        private String mapDescription[][]; 
    5861        private String mapLargeObjects[][]; 
    59         private Stack mapLargeObjectsPrecache; 
     62        private Stack<String> mapLargeObjectsPrecache; 
    6063        private int nSystem; 
    6164        private int mapWidth; 
     
    6770        private boolean bMapLoaded; 
    6871         
    69         private Vector notifyWindowList; 
     72        private Vector<JWindow> notifyWindowList; 
    7073         
    7174        private static final int PROTOCOL = 8; 
     
    7477        private static final int ADDDATA_LARGE_OBJECT = 2; 
    7578         
     79        /** 
     80         * Ein Sektor mit eigenen Schiffen 
     81         */ 
    7682        public static final int SECTOR_OWN_SHIPS = 1; 
     83        /** 
     84         * Ein Sektor mit alliierten Schiffen 
     85         */ 
    7786        public static final int SECTOR_ALLY_SHIPS = 2; 
     87        /** 
     88         * Ein Sektor mit feindlichen Schiffen 
     89         */ 
    7890        public static final int SECTOR_ENEMY_SHIPS = 3; 
    7991         
     92        /** 
     93         * Konstruktor 
     94         * 
     95         */ 
    8096        public MapConnector() { 
    8197                bMapLoaded = false; 
     
    84100                currentUser = 0; 
    85101                 
    86                 notifyWindowList = new Vector(); 
    87                  
    88                 mapLargeObjectsPrecache = new Stack(); 
     102                notifyWindowList = new Vector<JWindow>(); 
     103                 
     104                mapLargeObjectsPrecache = new Stack<String>(); 
    89105        } 
    90106         
     
    409425                // Alle eingetragenen Fenster informieren, dass wir jetzt fertig sind 
    410426                for( int i=0; i < notifyWindowList.size(); i++ ) { 
    411                         JWindow wnd = (JWindow)notifyWindowList.get(i); 
     427                        JWindow wnd = notifyWindowList.get(i); 
    412428                        wnd.handleEvent(wnd.getHandle(), "map_changed" ); 
    413429                } 
     
    595611                                return true; 
    596612                        } 
    597                         else { 
    598                                 return false; 
    599                         } 
     613                        return false; 
    600614                } 
    601615                else if( property == SECTOR_ALLY_SHIPS ) { 
     
    603617                                return true; 
    604618                        } 
    605                         else { 
    606                                 return false; 
    607                         } 
     619                        return false; 
    608620                } 
    609621                else if( property == SECTOR_ENEMY_SHIPS ) { 
     
    611623                                return true; 
    612624                        } 
    613                         else { 
    614                                 return false; 
    615                         } 
     625                        return false; 
    616626                } 
    617627                 
     
    629639        public void precacheImages(JImageCache imagecache ) { 
    630640                while( !mapLargeObjectsPrecache.empty() ) { 
    631                         String text = (String)mapLargeObjectsPrecache.pop(); 
     641                        String text = mapLargeObjectsPrecache.pop(); 
    632642                         
    633643                        BufferedImage masterimg = imagecache.loadImage("starmap/"+text+"_precache.png"); 
  • clients/jstarmap/net/driftingsouls/ds2/framework/services/SoapConnector.java

    r084f1ea rb0b7d55  
    3737 
    3838public class SoapConnector implements ServerConnectable { 
     39        /** 
     40         * Der Service-Name 
     41         */ 
    3942        public static final String SERVICE = SoapConnector.class.getName(); 
    4043         
     
    171174        } 
    172175         
     176        /** 
     177         * Der Uservalue fuer das gepufferte Zeichnen auf dem Bildschirm 
     178         */ 
    173179        public static final String USERVALUE_STARMAP_BUFFEREDOUTPUT = "TBLORDER/clients/jstarmap/bufferedoutput";       // 1 oder 0 
    174180         
  • clients/jstarmap/net/driftingsouls/ds2/framework/services/XMLConnector.java

    re5910b8 rb0b7d55  
    3838 */ 
    3939public class XMLConnector implements ServerConnectable { 
     40        /** 
     41         * Der Service-Name 
     42         */ 
    4043        public static final String SERVICE = XMLConnector.class.getName(); 
    4144         
     
    5558         
    5659        /** 
    57          * Ruft eine DS-URL auf und gibt sie als XML-Dokument zurueck. Anders als bei {@see #fetchStyledURL(String, String, String)} 
     60         * Ruft eine DS-URL auf und gibt sie als XML-Dokument zurueck. Anders als bei {@link #fetchStyledURL(String, String, String)} 
    5861         * wird nicht versucht eine alternative XML-Ausgabe zu bekommen 
    5962         *  
  • clients/jstarmap/net/driftingsouls/ds2/framework/services/XMLConnectorException.java

    re5910b8 rb0b7d55  
    2020package net.driftingsouls.ds2.framework.services; 
    2121 
     22/** 
     23 * Kapselt einen Fehler im XMLConnector 
     24 * @author Christopher Jung 
     25 * 
     26 */ 
    2227public class XMLConnectorException extends Exception { 
    2328        private static final long serialVersionUID = -4209104899616795575L; 
    2429 
     30        /** 
     31         * Konstruktor 
     32         * @param cause Der eigendliche Fehler 
     33         */ 
    2534        public XMLConnectorException(Throwable cause) { 
    2635                super(cause); 
  • clients/jstarmap/net/driftingsouls/ds2/jstarmap/JAboutDialog.java

    re5910b8 rb0b7d55  
    3434 */ 
    3535public class JAboutDialog extends JDialog {      
    36         private boolean autoHeight; 
     36        //private boolean autoHeight; 
    3737        private JTextField textfield; 
    3838         
     39        /** 
     40         * Konstruktor 
     41         * @param parent Das Elternfenster 
     42         * @param windowmanager Der Fenstermanager 
     43         * @param myfont Die zu verwendende Font 
     44         */ 
    3945        public JAboutDialog( JWindow parent, IWindowManager windowmanager, String myfont ) { 
    4046                super( parent, windowmanager ); 
    4147                 
    42                 autoHeight = false; 
     48                //autoHeight = false; 
    4349                 
    4450                textfield = new JTextField( this, windowmanager, myfont ); 
     
    4753        } 
    4854         
     55        /** 
     56         * Setzt den anzuzeigenden Text 
     57         * @param text Der anzuzeigende Text 
     58         */ 
    4959        public void setText( String text ) { 
    5060                textfield.setText( text ); 
    5161        } 
    5262         
     63        @Override 
    5364        public void setSize( int width, int height ) { 
    5465                super.setSize(width,height); 
     
    5768        } 
    5869         
     70        @Override 
    5971        public void setClientSize( int width, int height ) { 
    6072                super.setClientSize(width,height); 
     
    6375        } 
    6476         
     77        @Override 
    6578        public boolean mousePressed( int x, int y, int button ) { 
    6679                boolean result = super.mousePressed(x, y, button); 
  • clients/jstarmap/net/driftingsouls/ds2/jstarmap/JConfigureDialog.java

    re5910b8 rb0b7d55  
    6363        private boolean isAdmin; 
    6464 
     65        /** 
     66         * Konstruktor 
     67         * @param parent Das Elternfenster 
     68         * @param windowmanager Der Fenstermanager 
     69         * @param aMap Der Map-Connector 
     70         */ 
    6571        public JConfigureDialog(JWindow parent, IWindowManager windowmanager, MapConnector aMap ) { 
    6672                super(parent, windowmanager); 
     
    155161        } 
    156162         
     163        @Override 
    157164        public boolean handleEvent( int handle, String event ) { 
    158165                boolean result = super.handleEvent( handle, event ); 
     
    180187        } 
    181188         
     189        @Override 
    182190        public boolean mousePressed( int x, int y, int button ) { 
    183191                boolean result = super.mousePressed(x, y, button); 
     
    200208        } 
    201209         
     210        @Override 
    202211        public void paint( Graphics2D g ) { 
    203212                super.paint(g); 
  • clients/jstarmap/net/driftingsouls/ds2/jstarmap/JInfoDialog.java

    re5910b8 rb0b7d55  
    4949        private JButton addInfoButton; 
    5050         
     51        /** 
     52         * Konstruktor 
     53         * @param parent Das Elternfenster 
     54         * @param windowmanager Der Fenstermanager 
     55         * @param myfont Der zu verwendende Font 
     56         * @param map Der Map-Connector 
     57         */ 
    5158        public JInfoDialog( JWindow parent, IWindowManager windowmanager, String myfont, MapConnector map ) { 
    5259                super( parent, windowmanager ); 
     
    6572        } 
    6673         
     74        /** 
     75         * Setzt den anzuzeigenden Sektor 
     76         * @param x Die x-Koordinate des DS-Sektors 
     77         * @param y Die y-Koordinate des DS-Sektors 
     78         */ 
    6779        public void setSector( int x, int y ) { 
    6880                currentX = x; 
     
    99111        } 
    100112         
     113        /** 
     114         * Setzt die automatische Hoehenanpassung 
     115         * @param value <code>true</code>, wenn die automatische Hoehenanpassung aktiviert werden soll 
     116         */ 
    101117        public void setAutoHeight( boolean value ) {             
    102118                if( value ) { 
     
    110126        } 
    111127         
     128        @Override 
    112129        public void onResize() { 
    113130                if( addInfoButton != null ) { 
     
    131148        } 
    132149         
     150        @Override 
    133151        public boolean handleEvent( int handle, String event ) { 
    134152                boolean result = super.handleEvent( handle, event ); 
     
    158176        } 
    159177         
     178        @Override 
    160179        public boolean mousePressed( int x, int y, int button ) { 
    161180                boolean result = super.mousePressed(x, y, button); 
     
    170189        } 
    171190         
     191        @Override 
    172192        public void paint(Graphics2D g) {                
    173193                super.paint(g);          
  • clients/jstarmap/net/driftingsouls/ds2/jstarmap/JMapContextDialog.java

    re5910b8 rb0b7d55  
    4343        private JConfigureDialog dlgConfigure; 
    4444         
     45        /** 
     46         * Konstruktor 
     47         * @param parent Das Elternfenster 
     48         * @param windowmanager Der Fenstermanager 
     49         * @param map Der Map-Connector 
     50         */ 
    4551        public JMapContextDialog(JWindow parent, IWindowManager windowmanager, MapConnector map ) { 
    4652                super(parent, windowmanager); 
     
    7783        } 
    7884         
     85        @Override 
    7986        public boolean handleEvent( int handle, String event ) { 
    8087                boolean result = super.handleEvent( handle, event ); 
     
    112119        } 
    113120         
     121        @Override 
    114122        public boolean mousePressed( int x, int y, int button ) { 
    115123                boolean result = super.mousePressed(x, y, button); 
  • clients/jstarmap/net/driftingsouls/ds2/jstarmap/JMapViewer.java

    re5910b8 rb0b7d55  
    4646        private JInfoDialog dlgToolTip;  
    4747        private JMapContextDialog dlgMapContext; 
    48         private Vector mapImageList; 
     48        protected Vector<String> mapImageList; 
    4949         
    5050        private int xOffset; 
    5151        private int yOffset; 
    52         private int oldXOffset; 
    53         private int oldYOffset; 
    54          
    55         private int mapXOffset; 
    56         private int mapYOffset; 
     52        //private int oldXOffset; 
     53        //private int oldYOffset; 
     54         
     55        //private int mapXOffset; 
     56        //private int mapYOffset; 
    5757         
    5858        private int lastX; 
    5959        private int lastY; 
    6060         
    61         private MapConnector map; 
     61        protected MapConnector map; 
    6262         
    6363        private int currentZoom; 
    6464         
     65        /** 
     66         * Konstruktor 
     67         * @param parent Das Elternfenster 
     68         * @param windowmanager Der Fenstermanager 
     69         * @param map Der Map-Connector 
     70         */ 
    6571        public JMapViewer( JWindow parent, IWindowManager windowmanager, MapConnector map ) { 
    6672                super( parent, windowmanager ); 
     
    7278                xOffset = 0; 
    7379                yOffset = 0; 
    74                 oldXOffset = 0; 
     80                /*oldXOffset = 0; 
    7581                oldYOffset = 0; 
    7682                mapXOffset = 0; 
    77                 mapYOffset = 0; 
     83                mapYOffset = 0;*/ 
    7884                lastX = 0; 
    7985                lastY = 0; 
     
    97103                                        try { 
    98104                                                if( mapImageList == null ) { 
    99                                                         mapImageList = new Vector(); 
     105                                                        mapImageList = new Vector<String>(); 
    100106                                                                         
    101107                                                        for( int tmpy=0; tmpy < map.getHeight(); tmpy++ ) { 
     
    111117                                                                 
    112118                                                for( int i=0; i < mapImageList.size(); i++ ) { 
    113                                                         String file = (String)mapImageList.get(i); 
     119                                                        String file = mapImageList.get(i); 
    114120                                                                         
    115121                                                        getImageCache().dropImages(file+"#"+oldTileSize+"_"+oldTileSize); 
     
    124130        } 
    125131         
     132        @Override 
    126133        public boolean handleEvent( int handle, String event ) { 
    127134                boolean result = super.handleEvent( handle, event ); 
     
    137144        } 
    138145         
     146        /** 
     147         * Gibt den aktuellen Zoom der Karte zurueck 
     148         * @return Der aktuelle Zoom 
     149         */ 
    139150        public int getCurrentZoom() { 
    140151                return currentZoom; 
    141152        } 
    142153         
    143         /* 
    144          * zoomMap 
    145          * Die Karte zoomen. factor enthÀlt hierbei den entsprechenden Faktor 
    146          * factor=100 wÀren z.B. 100% (Normalgröße) 
    147          * x und y enthalten die Fensterkoordinate, um die gezoomt werden soll 
     154        /** 
     155         * Zoomt die Karte um einen bestimmten Faktor um eine Koordinate des Fensters herum 
     156         * @param factor der Faktor um den gezoomt werden soll (100 = Normalgroesse, 100%) 
     157         * @param x Die X-Koordinate im Fenster auf die gezoomt werden soll 
     158         * @param y Die Y-Koordinate im Fenster auf die gezoomt werden soll 
    148159         *  
    149160         */ 
    150          
    151161        public void zoomMap( int factor, int x, int y ) { 
    152162                if( factor < 1 ) { 
     
    172182                        tilesizeY = newTileSize; 
    173183                         
    174                         oldXOffset = 0; 
    175                         oldYOffset = 0; 
     184                        //oldXOffset = 0; 
     185                        //oldYOffset = 0; 
    176186                } 
    177187                 
     
    200210        } 
    201211         
     212        @Override 
    202213        public boolean mousePressed( int x, int y, int button ) { 
    203214                boolean result = super.mousePressed(x, y, button); 
     
    247258        } 
    248259         
     260        @Override 
    249261        public boolean mouseDragged( int x, int y, int button ) { 
    250262                boolean result = super.mouseDragged( x, y, button ); 
     
    258270                } 
    259271                 
    260                 oldXOffset = xOffset; 
    261                 oldYOffset = yOffset; 
     272                //oldXOffset = xOffset; 
     273                //oldYOffset = yOffset; 
    262274                 
    263275                xOffset += x - lastX; 
     
    288300        } 
    289301         
     302        @Override 
    290303        public boolean keyPressed( int keycode, char key ) { 
    291304                if( key == 'z' ) {       
     
    298311                        return true; 
    299312                } 
    300                 else { 
    301                         return super.keyPressed(keycode,key); 
    302                 } 
    303         } 
    304          
    305         public void drawMap(Graphics2D g) { 
     313                 
     314                return super.keyPressed(keycode,key); 
     315        } 
     316         
     317        /** 
     318         * Zeichnet die Karte 
     319         * @param g Der Zeichenkontext in dem gezeichnet werden soll 
     320         */ 
     321        protected void drawMap(Graphics2D g) { 
    306322                int xbase = 1; 
    307323                int ybase = 1; 
     
    467483        } 
    468484         
     485        @Override 
    469486        public void paint(Graphics2D g) { 
    470487                super.paint(g); 
  • clients/jstarmap/net/driftingsouls/ds2/jstarmap/JSectorInfoDialog.java

    re5910b8 rb0b7d55  
    4242 */ 
    4343public class JSectorInfoDialog extends JDialog implements IImageStatusNotifier { 
    44         private Vector shipPanels; 
     44        private Vector<JShipInfo> shipPanels; 
    4545        private String fontName; 
    4646         
     47        /** 
     48         * Konstruktor 
     49         * @param parent Das Elternfenster 
     50         * @param windowmanager Der Fenstermanager 
     51         * @param fontname Die zum Zeichnen zu verwendende Font 
     52         */ 
    4753        public JSectorInfoDialog( JWindow parent, IWindowManager windowmanager, String fontname ) { 
    4854                super( parent, windowmanager ); 
     
    5056                fontName = fontname;  
    5157                 
    52                 shipPanels = new Vector(); 
     58                shipPanels = new Vector<JShipInfo>(); 
    5359        } 
    5460         
     
    9197        } 
    9298         
     99        /** 
     100         * Setzt das XML-Dokument, welches die anzuzeigenden Daten enthaelt 
     101         * @param doc Das XML-Dokument mit den anzuzeigenden Daten 
     102         */ 
    93103        public void setDocumentSource( Document doc ) { 
    94104                for( int i=0; i < shipPanels.size(); i++ ) { 
    95                         ((JShipInfo)shipPanels.get(i)).dispose(); 
    96                 } 
    97                 shipPanels = new Vector(); 
     105                        shipPanels.get(i).dispose(); 
     106                } 
     107                shipPanels.clear(); 
    98108                 
    99109                int y = 0; 
     
    113123                        shipinfo.setProperty("relation", rel); 
    114124                         
    115                         Attr id = ship.getAttributeNode("id"); 
     125                        //Attr id = ship.getAttributeNode("id"); 
    116126                         
    117127                        NodeList elements = ship.getChildNodes(); 
     
    187197                 
    188198                for( int i=0; i < shipPanels.size(); i++ ) { 
    189                         JShipInfo shipinfo = (JShipInfo)shipPanels.get(i); 
     199                        JShipInfo shipinfo = shipPanels.get(i); 
    190200                         
    191201                        shipinfo.setPosition(0,y); 
     
    204214        } 
    205215         
     216        @Override 
    206217        public boolean mousePressed( int x, int y, int button ) { 
    207218                boolean result = super.mousePressed( x, y, button ); 
     
    216227        } 
    217228         
     229        @Override 
    218230        public void paint( Graphics2D g ) { 
    219231                super.paint(g);