@Override public void changed( DockTitleEvent event ){ super.changed( event ); if( event instanceof ActionsDockTitleEvent ){ suggestActions( ((ActionsDockTitleEvent)event).getSuggestions() ); } }
public Point getPopupLocation( Point click, boolean popupTrigger ) { DockTitle current = title.getAnswer(); if( current == null ) return null; return current.getPopupLocation( click, popupTrigger ); }
protected void valueChanged( OrientationToRotationStrategy oldValue, OrientationToRotationStrategy newValue ){ if( oldValue != null ){ oldValue.removeListener( orientationListener ); oldValue.uninstall( AbstractMultiDockTitle.this ); } if( newValue != null ){ newValue.install( AbstractMultiDockTitle.this ); newValue.addListener( orientationListener ); } updateLabelRotation(); } };
/** * Gets the insets that have to be applied between the border and the * content (icon, text, actions) of this title. Subclasses may use this method to * create free space in which they can paint additional items. * @return the insets, not <code>null</code> */ protected Insets getInnerInsets(){ if( getOrientation().isHorizontal() ) return DEFAULT_INSETS_HORIZONTAL; else return DEFAULT_INSETS_VERTICAL; }
public Component getComponent(){ return getTitle().getComponent(); } }
public void changed( Dockable dockable, DockTitle title, boolean active ) { title.changed( new ActivityDockTitleEvent( this, dockable, active )); }
/** * Removes all fonts which were set using {@link #addConditionalFont(String, Path, Condition, FontModifier)} */ protected void removeAllConditionalFonts(){ if( conditionalFonts != null ){ for( ConditionalFont font : conditionalFonts ){ removeFont( font ); } conditionalFonts = null; updateFonts(); } }
/** * Initializer called by the constructor. * @param dockable The Dockable whose title this will be * @param origin The version which was used to create this title * @param showMiniButtons <code>true</code> if the actions of the Dockable * should be shown, <code>false</code> if they should not be visible */ protected void init( Dockable dockable, DockTitleVersion origin, boolean showMiniButtons ){ super.init( dockable, origin ); setShowMiniButtons( showMiniButtons ); }
public void request( DockTitleRequest request ){ getControllerVersion( request ).request( request ); }
/** * Gets the Component which should be used to layout the current * DockTitle. * @param title the current DockTitle, never <code>null</code> * @return the component representing <code>title</code> */ protected Component getComponent( DockTitle title ){ return title.getComponent(); }
public void uninstall( DockTitleRequest request ){ getControllerVersion( request ).uninstall( request ); } }
/** * Sets the default border * @param border the default border, can be <code>null</code> */ public void setBorder( Border border ){ if( this.border != border ){ this.border = border; update(); } }
/** * Tells whether there is a factory with the importance <code>priority</code>, * or not. * @param priority the searched priority * @return <code>true</code> if there is a factory */ public boolean isSet( Priority priority ){ return factories[ map( priority ) ] != null; }
/** * Makes this request active. After installation the method {@link ResourceRequest#answer(Object,Object)} may * be called at any time. Please note that installing does not automatically trigger a call * to {@link #request()}. */ public void install(){ if( !installed ){ installed = true; version.install( this ); } }
@Override protected BasicTitleViewItem<JComponent> createItemFor( DockAction action, Dockable dockable ){ return AbstractDockTitle.this.createItemFor( action, dockable ); } };
/** * Gets the insets that have to be applied between the border and the * content (icon, text, actions) of this title. Subclasses may use this method to * create free space in which they can paint additional items. * @return the insets, not <code>null</code> */ protected Insets getInnerInsets(){ if( getOrientation().isHorizontal() ) return DEFAULT_INSETS_HORIZONTAL; else return DEFAULT_INSETS_VERTICAL; }
public Component getComponent(){ return getTitle().getComponent(); } }
public void changed( Dockable dockable, DockTitle title, boolean active ){ title.changed(new ActivityDockTitleEvent(this, dockable, active)); }