@Override public void setBackground( Color bg ) { super.setBackground( bg ); if( menuItem != null ) menuItem.setBackground( bg ); if( actions != null ){ for( ActionItem item : actions ){ if( item.item != null ) item.item.setBackground( bg ); } } }
@Override public void setBackground( Color bg ) { super.setBackground( bg ); if( menuItem != null ) menuItem.setBackground( bg ); if( actions != null ){ for( ActionItem item : actions ){ if( item.item != null ) item.item.setBackground( bg ); } } }
public void actionsAdded( DockActionSource source, int firstIndex, int lastIndex ) { for( int i = firstIndex; i <= lastIndex; i++ ){ DockAction action = source.getDockAction( i ); ActionItem entry = new ActionItem(); entry.action = action; if( dockable.getController() != null ){ BasicTitleViewItem<JComponent> item = createItemFor( action, dockable ); entry.item = item; if( item != null ){ action.bind( dockable ); item.bind(); item.setOrientation( orientation ); item.setForeground( getForeground() ); item.setBackground( getBackground() ); } } actions.add( i, entry ); } visibleActions = actions.size(); resetVisibleActions(); revalidate(); } public void actionsRemoved( DockActionSource source, int firstIndex, int lastIndex ) {
public void actionsAdded( DockActionSource source, int firstIndex, int lastIndex ) { for( int i = firstIndex; i <= lastIndex; i++ ){ DockAction action = source.getDockAction( i ); ActionItem entry = new ActionItem(); entry.action = action; if( dockable.getController() != null ){ BasicTitleViewItem<JComponent> item = createItemFor( action, dockable ); entry.item = item; if( item != null ){ action.bind( dockable ); item.bind(); item.setOrientation( orientation ); item.setForeground( getForeground() ); item.setBackground( getBackground() ); } } actions.add( i, entry ); } visibleActions = actions.size(); resetVisibleActions(); revalidate(); } public void actionsRemoved( DockActionSource source, int firstIndex, int lastIndex ) {
menuItem.setOrientation( orientation ); menuItem.setForeground( getForeground() ); menuItem.setBackground( getBackground() ); menuItem.bind(); item.setBackground( getBackground() );
menuItem.setOrientation( orientation ); menuItem.setForeground( getForeground() ); menuItem.setBackground( getBackground() ); menuItem.bind(); item.setBackground( getBackground() );