/** * Gets the title which is currently displayed. * @return the title or <code>null</code> */ public DockTitle getTitle(){ if( titleRequest == null ) return null; return titleRequest.getAnswer(); }
public DockTitle getTitle(){ if( title == null ) return null; return title.getAnswer(); }
public Point getPopupLocation( Point click, boolean popupTrigger ) { DockTitle current = title.getAnswer(); if( current == null ) return null; return current.getPopupLocation( click, popupTrigger ); }
public void unbind() { DockTitle title = request.getAnswer(); if( title != null ){ dockable.unbind( title ); content.removeAll(); } request.uninstall(); request = null; } }
private void updateOrientation(){ DockTitle title = this.title.getAnswer(); if( placement != null && title != null ){ switch( placement ){ case TOP_OF_DOCKABLE: title.setOrientation( Orientation.NORTH_SIDED ); break; case BOTTOM_OF_DOCKABLE: title.setOrientation( Orientation.SOUTH_SIDED ); break; case LEFT_OF_DOCKABLE: title.setOrientation( Orientation.WEST_SIDED ); break; case RIGHT_OF_DOCKABLE: title.setOrientation( Orientation.EAST_SIDED ); break; } } }
/** * Discards the current {@link DockableDisplayer} and creates a new one using the same * {@link DockTitle} as was used for the old one. If there is currently no {@link DockableDisplayer} * in use, then a new {@link DockTitle} is created. */ public void updateDisplayer(){ DockTitle title = null; if( displayer != null ){ title = displayer.getTitle(); displayers.release( displayer ); } else{ if( titleRequest != null ){ titleRequest.request(); title = titleRequest.getAnswer(); if( title != null ){ dockable.bind( title ); } } } displayer = displayers.fetch( dockable, title ); }
/** * Fires an event to the {@link DockTitle} of this <code>DockTitleTab</code>. */ protected void fire(){ DockTitle answer = title.getAnswer(); if( answer != null ){ EclipseDockTitleEvent eclipseEvent = new EclipseDockTitleEvent( station, dockable, selected, focused, paintIconWhenInactive ); answer.changed( eclipseEvent ); DockActionSource actions = new EclipseDockActionSource( theme, dockable.getGlobalActionOffers(), getEclipseTabStateInfo(), true ); ActionsDockTitleEvent actionEvent = new ActionsDockTitleEvent( station, dockable, actions ); answer.changed( actionEvent ); } } }
public void setTitle( DockTitleVersion version ){ if( title != null ){ DockTitle answer = title.getAnswer(); if( answer != null ){ answer.removeMouseInputListener( buttonListener );