com.tensegrity.gui.swing.dock.core
Class TabUtil

java.lang.Object
  extended bycom.tensegrity.gui.swing.dock.core.TabUtil

public final class TabUtil
extends java.lang.Object

Docking framework.

Version:
$Id: TabUtil.java,v 1.8 2005/07/07 16:46:34 sr Exp $
Author:
srutz

Method Summary
static void activateWindow(View view, TabEntry entry)
          Activates a given entry.
static javax.swing.Icon adjustNullIcon(javax.swing.Icon icon)
          Adjusts a null icon to an empty icon of size 16.
static TabPane getParentTabPane(View view, TabEntry entry)
          Returns the parent TabPane.
static boolean hasFocusRecursive(java.awt.Component component)
          Returns true when the given component or any of its children is the focus ownner.
static void moveFocus(TabEntry entry)
          Moves the focus.
static java.lang.String ptr8(java.lang.Object obj)
          Utility method, that returns a string rep.
static void refreshTitleContents(View view, TabEntry entry)
          Refreshes the title contents of an entry.
static void refreshTitleString(View view, TabEntry entry)
          Refreshes the title string of an entry.
static boolean replaceSplit(javax.swing.JComponent s, TabPane n, boolean firstChild, boolean vertical, double factor)
          Replaces a split.
static java.lang.String split2string(int split)
          Returns a debug string for the given split contant.
static void warning(java.lang.String msg)
          Prints a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

warning

public static final void warning(java.lang.String msg)
Prints a warning.

Parameters:
msg - the message to print.

refreshTitleContents

public static final void refreshTitleContents(View view,
                                              TabEntry entry)
Refreshes the title contents of an entry.

Parameters:
view - the view to operate in.
entry - the entry to refresh.

refreshTitleString

public static final void refreshTitleString(View view,
                                            TabEntry entry)
Refreshes the title string of an entry.

Parameters:
view - the view to operate in.
entry - the entry to refresh.

getParentTabPane

public static final TabPane getParentTabPane(View view,
                                             TabEntry entry)
Returns the parent TabPane.

Parameters:
view - the View to look in.
entry - the TabEntry to search for.
Returns:
the parent TabPane.

moveFocus

public static final void moveFocus(TabEntry entry)
Moves the focus.

Parameters:
entry - the destination entry.

hasFocusRecursive

public static final boolean hasFocusRecursive(java.awt.Component component)
Returns true when the given component or any of its children is the focus ownner.

Parameters:
component - root of the hierarchy to scan.
Returns:
true when focus was owned by the given hierarchy.

ptr8

public static final java.lang.String ptr8(java.lang.Object obj)
Utility method, that returns a string rep. of an object's pointer.

Parameters:
obj - the pointer to print.
Returns:
a standard length hex string describing the object pointer.

adjustNullIcon

public static final javax.swing.Icon adjustNullIcon(javax.swing.Icon icon)
Adjusts a null icon to an empty icon of size 16.

Parameters:
icon - the icon reference, can be null
Returns:
the original icon or if it was null then an empty icon of size 16x16.

activateWindow

public static final void activateWindow(View view,
                                        TabEntry entry)
Activates a given entry.

Parameters:
view - view to operate in.
entry - the entry to activate.

replaceSplit

public static final boolean replaceSplit(javax.swing.JComponent s,
                                         TabPane n,
                                         boolean firstChild,
                                         boolean vertical,
                                         double factor)
Replaces a split.

Parameters:
s - the split node to replace
n - the new tabpane
firstChild - whether to replace first child.
vertical - whether to replace vertically
factor - split factor.
Returns:
true if replace succeeded.

split2string

public static final java.lang.String split2string(int split)
Returns a debug string for the given split contant.

Parameters:
split - the split constant.
Returns:
a debug string for the given split contant.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.