public DockableProperty validLocation(){ DockableProperty location = composition.getLayout().getLocation(); if( location != oldLocation ){ return location; } return null; } }
/** * Tries to guess the location of the elements stored in the tree * below <code>composition</code>. Invoking this method is the same as calling * <code>guessLocation( composition, composition.getLayout().getLocation() );</code>. * @param composition the composition whose location will be determined */ public void estimateLocations( DockLayoutComposition composition ){ estimateLocations( composition, composition.getLayout().getLocation() ); }
public void prepare(){ if( valid ){ oldLocation = composition.getLayout().getLocation(); for( Node child : children ){ child.prepare(); } } }
/** * Lists for all keys that can be found in <code>composition</code> its * estimated location.<br> * Note: This method will call {@link #estimateLocations(DockLayoutComposition)} * to get the most recent locations * @param composition some composition to search for keys and locations * @param missingOnly if set, then only locations of keys for which * no {@link DockLayout} is set are reported. This are the keys which most * likely will be ignored when calling {@link #convert(DockLayoutComposition)} * @return the map of keys and positions, might be empty */ public Map<String, DockableProperty> listEstimatedLocations( DockLayoutComposition composition, boolean missingOnly ){ return listEstimatedLocations( composition, composition.getLayout().getLocation(), missingOnly ); }
/** * Lists for all keys that can be found in <code>composition</code> its * estimated location.<br> * Note: This method will call {@link #estimateLocations(DockLayoutComposition)} * to get the most recent locations * @param composition some composition to search for keys and locations * @param missingOnly if set, then only locations of keys for which * no {@link DockLayout} is set are reported. This are the keys which most * likely will be ignored when calling {@link #convert(DockLayoutComposition)} * @return the map of keys and positions, might be empty */ public Map<String, DockableProperty> listEstimatedLocations( DockLayoutComposition composition, boolean missingOnly ){ return listEstimatedLocations( composition, composition.getLayout().getLocation(), missingOnly ); }
private void listEstimatedLocations( DockLayoutComposition composition, boolean missingOnly, Map<String, DockableProperty> map ){ DockableProperty location = composition.getLayout().getLocation(); if( location != null ){ String key = getKey( composition, missingOnly ); if( key != null){ map.put( key, location ); } } List<DockLayoutComposition> children = composition.getChildren(); if( children != null ){ for( DockLayoutComposition child : children ){ listEstimatedLocations( child, missingOnly, map ); } } }
private void listEstimatedLocations( DockLayoutComposition composition, boolean missingOnly, Map<String, DockableProperty> map ){ DockableProperty location = composition.getLayout().getLocation(); if( location != null ){ String key = getKey( composition, missingOnly ); if( key != null){ map.put( key, location ); } } List<DockLayoutComposition> children = composition.getChildren(); if( children != null ){ for( DockLayoutComposition child : children ){ listEstimatedLocations( child, missingOnly, map ); } } }
private void appendFirstOnEstimate( DockLayoutComposition composition, DockableProperty location ){ DockLayoutInfo info = composition.getLayout(); DockableProperty property = info.getLocation(); if( property != null ){ info.setLocation( DockUtilities.append( property, location ) ); } for( DockLayoutComposition child : composition.getChildren() ){ appendFirstOnEstimate( child, location ); } }
DockLayout<?> newLayout = new DockLayout<MultipleCDockable>( REPLACEMENT_FACTORY_ID, match ); DockLayoutInfo newInfo = new DockLayoutInfo( newLayout ); newInfo.setLocation( info.getLocation() ); info = newInfo;
DockLayout<?> newLayout = new DockLayout<MultipleCDockable>( REPLACEMENT_FACTORY_ID, match ); DockLayoutInfo newInfo = new DockLayoutInfo( newLayout ); newInfo.setLocation( info.getLocation() ); info = newInfo;
info.setLocation( original.getLocation() );
if( info.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT ){ if( info.getDataLayout().getFactoryID().equals( factoryId )){ DockableProperty location = info.getLocation(); if( location != null ){ DockFactory<DockElement,?,Object> normalizedFactory = (DockFactory<DockElement,?,Object>)factory;