public MovingImage create( DockController controller, DockTitle snatched ) { return new TitleMovingImage( snatched.getDockable(), reduced.createTitle( snatched.getDockable() )); }
public FocusVeto vetoFocus( FocusController controller, DockTitle title ){ return veto( title.getDockable() ); }
public MovingImage create( DockController controller, DockTitle snatched ) { return create( controller, snatched.getDockable() ); }
public FocusVeto vetoFocus( FocusController controller, DockTitle title ){ return veto( title.getDockable() ); }
@Override protected CDockable getDockable( DockFont observer ) { Dockable dockable = ((TitleFont)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ){ return ((CommonDockable)dockable).getDockable(); } return null; } }
@Override protected CDockable getDockable( DockFont observer ) { Dockable dockable = ((TitleFont)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ){ return ((CommonDockable)dockable).getDockable(); } return null; } }
@Override protected CDockable getDockable( DockFont observer ) { Dockable dockable = ((TitleFont)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ){ return ((CommonDockable)dockable).getDockable(); } return null; } }
@Override protected CDockable getDockable( DockColor observer ) { Dockable dockable = ((TitleColor)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ) return ((CommonDockable)dockable).getDockable(); return null; }
/** * Invoked by the listeners of a title to start a drag and drop operation. * @param e the initializing event * @param title the grabbed title, can be <code>null</code> if * <code>dockable</code> is not <code>null</code> * @param dockable the grabbed Dockable, can be <code>null</code> * if <code>title</code> is not <code>null</code> */ protected void dragMousePressed( MouseEvent e, DockTitle title, Dockable dockable ) { if( dockable == null ) dockable = title.getDockable(); Point point = e.getPoint(); SwingUtilities.convertPointToScreen( point, e.getComponent() ); Reaction reaction = dragMousePressed( point.x, point.y, e.getX(), e.getY(), e.getModifiersEx(), dockable, false ); if( reaction == Reaction.BREAK_CONSUMED || reaction == Reaction.CONTINUE_CONSUMED ) e.consume(); }
@Override protected CDockable getDockable( DockFont observer ) { Dockable dockable = ((TitleFont)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ){ return ((CommonDockable)dockable).getDockable(); } return null; } }
/** * Invoked by the listeners of a title to start a drag and drop operation. * @param e the initializing event * @param title the grabbed title, can be <code>null</code> if * <code>dockable</code> is not <code>null</code> * @param dockable the grabbed Dockable, can be <code>null</code> * if <code>title</code> is not <code>null</code> */ protected void dragMousePressed( MouseEvent e, DockTitle title, Dockable dockable ) { if( dockable == null ) dockable = title.getDockable(); Point point = e.getPoint(); SwingUtilities.convertPointToScreen( point, e.getComponent() ); Reaction reaction = dragMousePressed( point.x, point.y, e.getX(), e.getY(), e.getModifiersEx(), dockable, false ); if( reaction == Reaction.BREAK_CONSUMED || reaction == Reaction.CONTINUE_CONSUMED ) e.consume(); }
@Override protected void validate( DockTitle resource ){ if( resource != null ){ if( resource.getDockable() != getTarget() ){ throw new IllegalArgumentException( "title.getDockable() does not return target"); } if( resource.getOrigin() != getVersion() ){ throw new IllegalArgumentException( "title.getOrigin() does not return version" ); } } } }
@Override protected CDockable getDockable( DockColor observer ) { Dockable dockable = ((TitleColor)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ) return ((CommonDockable)dockable).getDockable(); return null; }
@Override protected CDockable getDockable( DockColor observer ) { Dockable dockable = ((TitleColor)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ) return ((CommonDockable)dockable).getDockable(); return null; }
@Override protected CDockable getDockable( DockFont observer ) { Dockable dockable = ((TitleFont)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ){ return ((CommonDockable)dockable).getDockable(); } return null; } }
@Override protected CDockable getDockable( DockFont observer ) { Dockable dockable = ((TitleFont)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ){ return ((CommonDockable)dockable).getDockable(); } return null; } }
@Override protected CDockable getDockable( DockColor observer ) { Dockable dockable = ((TitleColor)observer).getTitle().getDockable(); if( dockable instanceof CommonDockable ) return ((CommonDockable)dockable).getDockable(); return null; }
/** * Invoked while the user drags a title or Dockable and releases a mouse * button. * @param e the initializing event * @param title the grabbed title, can be <code>null</code> if * <code>dockable</code> is not <code>null</code> * @param dockable the grabbed Dockable, can be <code>null</code> * if <code>title</code> is not <code>null</code> */ protected void dragMouseReleased( MouseEvent e, DockTitle title, Dockable dockable ) { if( dockable == null ) dockable = title.getDockable(); Point point = e.getPoint(); SwingUtilities.convertPointToScreen( point, e.getComponent() ); Reaction reaction = dragMouseReleased( point.x, point.y, e.getModifiersEx(), dockable ); if( reaction == Reaction.BREAK_CONSUMED || reaction == Reaction.CONTINUE_CONSUMED ) e.consume(); }
public MovingImage create( DockController controller, DockTitle snatched ) { if( snatched.getOrigin() != null ){ DockTitleVersion origin = snatched.getOrigin(); return new UpdatingTitleMovingImage( snatched.getDockable(), origin, snatched.getOrientation() ); } /* TODO find a way to use the preferred size */ Component c = snatched.getComponent(); BufferedImage image = new BufferedImage( Math.max( 1, c.getWidth()), Math.max( 1, c.getHeight()), BufferedImage.TYPE_INT_ARGB ); Graphics graphics = image.getGraphics(); c.paint( graphics ); graphics.dispose(); TrueMovingImage moving = new TrueMovingImage(); moving.setImage( image ); return moving; }
@Override public MovingImage create( DockController controller, DockTitle snatched ){ ToolbarStrategy strategy = controller.getProperties().get( ToolbarStrategy.STRATEGY ); MovingImage image = null; if( strategy.isToolbarPart( snatched.getDockable() )){ image = delegate.create( controller, snatched ); } if( image == null ){ return null; } return new OffsetWrapper( image ); }