Get special MultipleCDockable


How can I get a special MultipleCDockable in the WorkingArea? Like in the demo-application “paint”, when I show a picture that may has been shown, how can I find it in the WorkingArea and toFront it. The “paint” demo could creat a new PictureDockable to show a picture that may has been shown in the WorkingArea now, and then maybe there is many different PictureDockable in the WorkingArea but show a same picture.

My goals is that a pictuer that has same name only could be shown once in the WorkingArea.

(Sorry for my english, I wish you could understand my means.)

I would just use a map for this effect. If a “picture” should be shown you check the map for the dockable and call “toFront”. Something like:

public void show( Picture picture ){
  DefaultMultipleCDockable dockable = map.get( picture );
  if( dockable == null ){
    dockable = new ...
    map.put( picture, dockable );
    dockable.setRemoveOnClose( false );
    ccontrol.add( dockable );

    [...] // other necessary code
  dockable.setVisible( true );
  dockable.toFront( true );

Sorry for my pool using map:mad:, I get it now:D.