bibliothek.gui.dock.common.intern.CControlAccess Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docking-frames-common Show documentation
Show all versions of docking-frames-common Show documentation
DockingFrames is an open source Java Swing docking framework, licenced under LGPL 2.1.
This is the same distribution as the original distribution (http://www.docking-frames.org/), only reinstalled in maven
/*
* Bibliothek - DockingFrames
* Library built on Java/Swing, allows the user to "drag and drop"
* panels containing any Swing-Component the developer likes to add.
*
* Copyright (C) 2007 Benjamin Sigg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Benjamin Sigg
* [email protected]
* CH - Switzerland
*/
package bibliothek.gui.dock.common.intern;
import bibliothek.gui.Dockable;
import bibliothek.gui.dock.action.DockAction;
import bibliothek.gui.dock.common.CControl;
import bibliothek.gui.dock.common.CLocation;
import bibliothek.gui.dock.common.MissingCDockableStrategy;
import bibliothek.gui.dock.common.MultipleCDockableFactory;
import bibliothek.gui.dock.common.mode.CLocationModeManager;
import bibliothek.gui.dock.layout.DockableProperty;
import bibliothek.util.FrameworkOnly;
/**
* Gives access to the internal methods of a {@link bibliothek.gui.dock.common.CControl}.
* This class is not intended to be used by clients, using it wrongly can result in weird
* behavior of its owning {@link CControl}.
* @author Benjamin Sigg
*/
@FrameworkOnly
public interface CControlAccess {
/**
* Gets the control to which this object gives access.
* @return the owner
*/
public CControl getOwner();
/**
* Makes dockable
visible.
* @param dockable the element that will be made visible
*/
public void show( CDockable dockable );
/**
* Makes dockable
invisible.
* @param dockable the element that will be made invisible
*/
public void hide( CDockable dockable );
/**
* Tells whether dockable
is visible or not.
* @param dockable the dockable whose visibility-state is in question
* @return true
if dockable
is visible
*/
public boolean isVisible( CDockable dockable );
/**
* Tells whether dockable
has a parent and is registered.
* @param dockable the dockable to check
* @return true
if dockable
is in the tree and not a root
*/
public boolean hasParent( CDockable dockable );
/**
* Gets the id of factory
.
* @param factory the factory to search
* @return the id or null
*/
public String getFactoryId( MultipleCDockableFactory,?> factory );
/**
* Gets the manager that is responsible to change the extended mode of the
* {@link Dockable}s.
* @return the manager
*/
public CLocationModeManager getLocationManager();
/**
* Gets an action that closes dockable
when clicked.
* @param dockable the element to close
* @return the action
*/
public DockAction createCloseAction( CDockable dockable );
/**
* Gives or removes access to internal properties of an {@link CDockable}.
* @param dockable the element which changes its access
* @param access the new access, might be null
*/
public void link( CDockable dockable, CDockableAccess access );
/**
* Grants access to the internal methods of a {@link CDockable}.
* @param dockable the element whose access is searched
* @return the access or null
*/
public CDockableAccess access( CDockable dockable );
/**
* Calls one of the shouldStore
methods of {@link MissingCDockableStrategy} if
* key
has the correct format
* @param key the key for which a dockable might be stored
* @return true
if layout information for key
should
* be stored, false
otherwise
*/
public boolean shouldStore( String key );
/**
* Tells whether information about dockable
should remain stored even if
* the element is removed from the {@link CControl}.
* @param dockable the element to check
* @return null
if nothing should be stored, the unique encoded identifier of dockable
* if data should remain stored
*/
public String shouldStore( CDockable dockable );
/**
* Gets the mutable register of the {@link CControl}. Note that clients should
* only query this register, but not change anything in it.
* @return the register
*/
public MutableCControlRegister getRegister();
/**
* Gets the default result for {@link CDockable#getAutoBaseLocation(boolean)}.
* @param dockable the element whose location is searched
* @param noBackwardTransformation if true
, then no {@link DockableProperty} should be converted to a {@link CLocation}
* @return the location or null
if not available
*/
public CLocation getAutoBaseLocation( CDockable dockable, boolean noBackwardTransformation );
}