Tabnine Logo
DockLayoutInfo.getDataLayout
Code IndexAdd Tabnine to your IDE (free)

How to use
getDataLayout
method
in
bibliothek.gui.dock.layout.DockLayoutInfo

Best Java code snippets using bibliothek.gui.dock.layout.DockLayoutInfo.getDataLayout (Showing top 20 results out of 315)

origin: xyz.cofe/docking-frames-common

  /**
   * Gets the layout information that was produced the {@link DockFactory} with id {@link #getFactoryId()}.
   * @return the layout information or <code>null</code> if not present in object format
   */
  public DockLayout<?> getLayout(){
    return layout.getDataLayout();
  }
}
origin: org.opentcs.thirdparty.dockingframes/docking-frames-common

  /**
   * Gets the layout information that was produced the {@link DockFactory} with id {@link #getFactoryId()}.
   * @return the layout information or <code>null</code> if not present in object format
   */
  public DockLayout<?> getLayout(){
    return layout.getDataLayout();
  }
}
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@SuppressWarnings("unchecked")
public void estimateLocations( PredefinedLayout layout, LocationEstimationMap children ){
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT ){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<DockElement,?,Object> factory = (DockFactory<DockElement,?,Object>)getFactory( factoryId );
    if( factory != null ){
      factory.estimateLocations( delegate.getDataLayout().getData(), children );
    }
  }
}
origin: xyz.cofe/docking-frames-core

@Override
public String getIdentifier( DockLayoutComposition composition ){
  DockLayout<?> layout = composition.getLayout().getDataLayout();
  if( layout != null && layout.getFactoryID().equals( KNOWN )){
    PredefinedLayout predefined = (PredefinedLayout) layout.getData();
    return predefined.getPredefined();
  }
  return null;
}

origin: xyz.cofe/docking-frames-core

@SuppressWarnings("unchecked")
public void estimateLocations( PredefinedLayout layout, LocationEstimationMap children ){
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT ){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<DockElement,?,Object> factory = (DockFactory<DockElement,?,Object>)getFactory( factoryId );
    if( factory != null ){
      factory.estimateLocations( delegate.getDataLayout().getData(), children );
    }
  }
}
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@Override
public String getIdentifier( DockLayoutComposition composition ){
  DockLayout<?> layout = composition.getLayout().getDataLayout();
  if( layout != null && layout.getFactoryID().equals( KNOWN )){
    PredefinedLayout predefined = (PredefinedLayout) layout.getData();
    return predefined.getPredefined();
  }
  return null;
}

origin: xyz.cofe/docking-frames-core

@SuppressWarnings("unchecked")
public void layoutPerspective( PerspectiveElement element, PredefinedLayout layout, Map<Integer, PerspectiveDockable> children ){
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT && shouldLayout( element, perspective )){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory factory = getFactory( factoryId );
    if( factory != null ){
      factory.layoutPerspective( element, delegate.getDataLayout().getData(), children );
    }
  }
}

origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@SuppressWarnings("unchecked")
public void layoutPerspective( PerspectiveElement element, PredefinedLayout layout, Map<Integer, PerspectiveDockable> children ){
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT && shouldLayout( element, perspective )){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory factory = getFactory( factoryId );
    if( factory != null ){
      factory.layoutPerspective( element, delegate.getDataLayout().getData(), children );
    }
  }
}

origin: xyz.cofe/docking-frames-common

private void findVisible( Set<Dockable> visible, DockLayoutComposition layout ){
  DockLayoutInfo info = layout.getLayout();
  if( info != null ){
    DockLayout<?> data = info.getDataLayout();
    if( data != null ){
      if( REPLACEMENT_FACTORY_ID.equals( data.getFactoryID() )){
        CDockable dockable = (CDockable)data.getData();
        visible.add( dockable.intern() );
      }
    }
  }
  
  for( DockLayoutComposition child : layout.getChildren() ){
    findVisible( visible, child );
  }
}

origin: org.opentcs.thirdparty.dockingframes/docking-frames-common

private void findVisible( Set<Dockable> visible, DockLayoutComposition layout ){
  DockLayoutInfo info = layout.getLayout();
  if( info != null ){
    DockLayout<?> data = info.getDataLayout();
    if( data != null ){
      if( REPLACEMENT_FACTORY_ID.equals( data.getFactoryID() )){
        CDockable dockable = (CDockable)data.getData();
        visible.add( dockable.intern() );
      }
    }
  }
  
  for( DockLayoutComposition child : layout.getChildren() ){
    findVisible( visible, child );
  }
}
 
origin: xyz.cofe/docking-frames-core

/**
 * Gets the name of element which is represented by <code>composition</code>.
 * @param composition the composition whose element key is searched
 * @param missingOnly if set, then the key will only be returned if <code>composition</code>
 * is not fully loaded
 * @return the key or <code>null</code>
 */
private String getKey( DockLayoutComposition composition, boolean missingOnly ){
  DockLayoutInfo layout = composition.getLayout();
  if( layout.getKind() != DockLayoutInfo.Data.DOCK_LAYOUT )
    return null;
  
  if( !KNOWN.equals( layout.getDataLayout().getFactoryID() ))
    return null;
  
  PredefinedLayout preloaded = (PredefinedLayout)layout.getDataLayout().getData();
  if( missingOnly && preloaded.getDelegate().getKind() == DockLayoutInfo.Data.DOCK_LAYOUT ){
    // if there is such a Dockable registered then it is not missing...
    if( stringToElement.containsKey( preloaded.getPredefined() )){
      return null;
    }
  }
  
  String key = preloaded.getPredefined();
  return key;
}
origin: xyz.cofe/docking-frames-core

public DockElement layout( PredefinedLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders ) {
  DockLayoutInfo delegate = layout.getDelegate();
  boolean isLayout = delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT;
  boolean isNull =  delegate.getKind() == DockLayoutInfo.Data.NULL;
  if( !isLayout && !isNull ){
    return null;
  }
  
  DockElement element = stringToElement.get( layout.getPredefined() );
  if( element == null && isLayout ){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<?, ?, BackupFactoryData<?>> factory = getBackup( factoryId );
    if( factory != null ){
      return factory.layout( new BackupFactoryData<Object>(
          layout.getPredefined(), 
          delegate.getDataLayout().getData()), children,
          placeholders );
    }
    return null;
  }
  setLayout( element, layout, children, placeholders );
  return element;
}
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@SuppressWarnings("unchecked")
public void setLayout( DockElement element, PredefinedLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders ) {
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT && shouldLayout( element )){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<DockElement,?,Object> factory = (DockFactory<DockElement,?,Object>)getFactory( factoryId );
    if( factory != null ){
      DockController controller = element.getController();
      try{
        if( controller != null )
          controller.freezeLayout();
        
        factory.setLayout( element, delegate.getDataLayout().getData(), children, placeholders );
      }
      finally{
        if( controller != null )
          controller.meltLayout();
      }
    }
  }
}
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

public DockElement layout( PredefinedLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders ) {
  DockLayoutInfo delegate = layout.getDelegate();
  boolean isLayout = delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT;
  boolean isNull =  delegate.getKind() == DockLayoutInfo.Data.NULL;
  if( !isLayout && !isNull ){
    return null;
  }
  
  DockElement element = stringToElement.get( layout.getPredefined() );
  if( element == null && isLayout ){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<?, ?, BackupFactoryData<?>> factory = getBackup( factoryId );
    if( factory != null ){
      return factory.layout( new BackupFactoryData<Object>(
          layout.getPredefined(), 
          delegate.getDataLayout().getData()), children,
          placeholders );
    }
    return null;
  }
  setLayout( element, layout, children, placeholders );
  return element;
}
origin: xyz.cofe/docking-frames-core

@SuppressWarnings("unchecked")
public void setLayout( DockElement element, PredefinedLayout layout, Map<Integer, Dockable> children, PlaceholderStrategy placeholders ) {
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT && shouldLayout( element )){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<DockElement,?,Object> factory = (DockFactory<DockElement,?,Object>)getFactory( factoryId );
    if( factory != null ){
      DockController controller = element.getController();
      try{
        if( controller != null )
          controller.freezeLayout();
        
        factory.setLayout( element, delegate.getDataLayout().getData(), children, placeholders );
      }
      finally{
        if( controller != null )
          controller.meltLayout();
      }
    }
  }
}
origin: xyz.cofe/docking-frames-core

@SuppressWarnings("unchecked")
public void setLayout( DockElement element, PredefinedLayout layout, PlaceholderStrategy placeholders ) {
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT && shouldLayout( element )){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<DockElement,?,Object> factory = (DockFactory<DockElement,?,Object>)getFactory( factoryId );
    if( factory != null ){
      DockController controller = element.getController();
      try{
        if( controller != null )
          controller.freezeLayout();
        
        factory.setLayout( element, delegate.getDataLayout().getData(), placeholders );
      }
      finally{
        if( controller != null )
          controller.meltLayout();
      }
    }
  }
}
origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@SuppressWarnings("unchecked")
public void setLayout( DockElement element, PredefinedLayout layout, PlaceholderStrategy placeholders ) {
  DockLayoutInfo delegate = layout.getDelegate();
  if( delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT && shouldLayout( element )){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory<DockElement,?,Object> factory = (DockFactory<DockElement,?,Object>)getFactory( factoryId );
    if( factory != null ){
      DockController controller = element.getController();
      try{
        if( controller != null )
          controller.freezeLayout();
        
        factory.setLayout( element, delegate.getDataLayout().getData(), placeholders );
      }
      finally{
        if( controller != null )
          controller.meltLayout();
      }
    }
  }
}
origin: xyz.cofe/docking-frames-core

@SuppressWarnings("unchecked")
public PerspectiveElement layoutPerspective( PredefinedLayout layout, Map<Integer, PerspectiveDockable> children ){
  if( perspective == null ){
    throw new IllegalStateException( "the perspective of this factory is not set, meaning this factory cannot be used handling perspective dependent tasks" );
  }
  DockLayoutInfo delegate = layout.getDelegate();
  boolean isLayout = delegate.getKind() == DockLayoutInfo.Data.DOCK_LAYOUT;
  boolean isNull =  delegate.getKind() == DockLayoutInfo.Data.NULL;
  if( !isLayout && !isNull ){
    return null;
  }
  
  PerspectiveElement element = perspective.get( layout.getPredefined() );
  if( element == null && isLayout ){
    String factoryId = delegate.getDataLayout().getFactoryID();
    DockFactory factory = getBackup( factoryId );
    if( factory != null ){
      return factory.layoutPerspective(new BackupFactoryData<Object>( layout.getPredefined(), delegate.getDataLayout().getData()), children );
    }
    return null;
  }
  layoutPerspective( element, layout, children );
  return element;
}

origin: xyz.cofe/docking-frames-core

@Override
protected DockLayoutInfo fillMissing( DockLayoutInfo info ) {
  DockLayout<?> layout = info.getDataLayout();
  if( KNOWN.equals( layout.getFactoryID() )){
    PredefinedLayout preloaded = (PredefinedLayout)layout.getData();
    DockLayoutInfo delegate = preloaded.getDelegate();
    DockLayoutInfo newDelegate = null;
    if( delegate.getKind() == DockLayoutInfo.Data.BYTE ){
      newDelegate = fillMissingStream( preloaded );
    }
    else if( delegate.getKind() == DockLayoutInfo.Data.XML ){
      newDelegate = fillMissingXML( preloaded );
    }
    if( newDelegate != null ){
      info = new DockLayoutInfo( new DockLayout<PredefinedLayout>( 
          KNOWN, new PredefinedLayout( preloaded.getPredefined(), newDelegate )));
    }
  }
  return info;
}

origin: org.opentcs.thirdparty.dockingframes/docking-frames-core

@Override
protected DockLayoutInfo fillMissing( DockLayoutInfo info ) {
  DockLayout<?> layout = info.getDataLayout();
  if( KNOWN.equals( layout.getFactoryID() )){
    PredefinedLayout preloaded = (PredefinedLayout)layout.getData();
    DockLayoutInfo delegate = preloaded.getDelegate();
    DockLayoutInfo newDelegate = null;
    if( delegate.getKind() == DockLayoutInfo.Data.BYTE ){
      newDelegate = fillMissingStream( preloaded );
    }
    else if( delegate.getKind() == DockLayoutInfo.Data.XML ){
      newDelegate = fillMissingXML( preloaded );
    }
    if( newDelegate != null ){
      info = new DockLayoutInfo( new DockLayout<PredefinedLayout>( 
          KNOWN, new PredefinedLayout( preloaded.getPredefined(), newDelegate )));
    }
  }
  return info;
}

bibliothek.gui.dock.layoutDockLayoutInfogetDataLayout

Javadoc

Gets the data of this info as DockLayout.

Popular methods of DockLayoutInfo

  • setLocation
    Sets the location of the Dockable ,represented by this info, on its parent station.
  • <init>
    Creates a new info.
  • getDataByte
    Gets the data of this info as byte array.
  • getDataXML
    Gets the data of this info formated as xml.
  • getKind
    Tells what kind of information can be found in this info.
  • getLocation
    Gets the location of of the Dockable on its parent station.
  • setData
    Sets the information of this info. The object data must either be null, or an instance of XElement,b
  • getPlaceholder
    Gets the representation of this element as placeholder.
  • setPlaceholder
    Sets a placeholder which represents this element.

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now