org.kde.koala
Class KURLBarItem

java.lang.Object
  extended by org.kde.qt.QListBoxItem
      extended by org.kde.qt.QListBoxPixmap
          extended by org.kde.koala.KURLBarItem
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KURLBarItem
extends org.kde.qt.QListBoxPixmap

An item to be used in KURLBar / KURLBarListBox. All the properties (url, icon, description, tooltip) can be changed dynamically.

Author:
Carsten Pfeiffer
See Also:
KURLBar, KURLBarListBox

Constructor Summary
protected KURLBarItem(java.lang.Class dummy)
           
  KURLBarItem(KURLBar parent, KURL url)
           
  KURLBarItem(KURLBar parent, KURL url, boolean persistent)
           
  KURLBarItem(KURLBar parent, KURL url, boolean persistent, java.lang.String description)
           
  KURLBarItem(KURLBar parent, KURL url, boolean persistent, java.lang.String description, java.lang.String icon)
           
  KURLBarItem(KURLBar parent, KURL url, boolean persistent, java.lang.String description, java.lang.String icon, int group)
          Creates a KURLBarItem to be used in the parent KURLBar.
  KURLBarItem(KURLBar parent, KURL url, java.lang.String description)
           
  KURLBarItem(KURLBar parent, KURL url, java.lang.String description, java.lang.String icon)
           
  KURLBarItem(KURLBar parent, KURL url, java.lang.String description, java.lang.String icon, int group)
          Creates a persistent KURLBarItem to be used in the parent KURLBar.
 
Method Summary
 boolean applicationLocal()
          returns whether this is a global item or a local one.
 java.lang.String description()
          returns the description of this item.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
protected  void finalize()
          Deletes the wrapped C++ instance
 int height(org.kde.qt.QListBox arg1)
          returns the height of this item.
 java.lang.String icon()
          returns the icon of this item.
 int iconGroup()
          returns the icon-group of this item (determines icon-effects).
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 boolean isPersistent()
          returns whether this item is persistent (via KURLBar.writeConfig() and KURLBar.readConfig()) or not.
protected  void paint(org.kde.qt.QPainter p)
           
 org.kde.qt.QPixmap pixmap()
          returns the pixmap of this item.
 void setApplicationLocal(boolean local)
          Makes this item a local or global one.
 void setDescription(java.lang.String desc)
          Sets the description of this item that will be shown as item-text.
 void setIcon(java.lang.String icon)
           
 void setIcon(java.lang.String icon, int group)
          sets the icon for this item.
 void setToolTip(java.lang.String tip)
          Sets a tooltip to be used for this item.
 void setURL(KURL url)
          Sets url for this item.
 org.kde.qt.QSize sizeHint()
          returns the preferred size of this item
 java.lang.String toolTip()
          returns the tooltip of this item.
 KURL url()
          returns the url of this item.
 int width(org.kde.qt.QListBox arg1)
          returns the width of this item.
 
Methods inherited from class org.kde.qt.QListBoxPixmap
rtti
 
Methods inherited from class org.kde.qt.QListBoxItem
current, isCurrent, isSelectable, isSelected, listBox, next, prev, selected, setSelectable, text
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KURLBarItem

protected KURLBarItem(java.lang.Class dummy)

KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   boolean persistent,
                   java.lang.String description,
                   java.lang.String icon,
                   int group)
Creates a KURLBarItem to be used in the parent KURLBar. You need to insert the item into the listbox manually, if you don't use KURLBar.insertItem(). If description is empty, it will try to use the filename/directory of url, which will be shown as text of the item. url will be used as tooltip, unless you set a different tip with setToolTip(). persistent specifies whether this item is a persistent item or a dynamic item, that is not saved with KURLBar.writeConfig().


KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   boolean persistent,
                   java.lang.String description,
                   java.lang.String icon)

KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   boolean persistent,
                   java.lang.String description)

KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   boolean persistent)

KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   java.lang.String description,
                   java.lang.String icon,
                   int group)
Creates a persistent KURLBarItem to be used in the parent KURLBar. You need to insert the item into the listbox manually, if you don't use KURLBar.insertItem(). If description is empty, it will try to use the filename/directory of url, which will be shown as text of the item. url will be used as tooltip, unless you set a different tip with setToolTip(). persistent specifies whether this item is a persistent item or a dynamic item, that is not saved with KURLBar.writeConfig().


KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   java.lang.String description,
                   java.lang.String icon)

KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url,
                   java.lang.String description)

KURLBarItem

public KURLBarItem(KURLBar parent,
                   KURL url)
Method Detail

setURL

public void setURL(KURL url)
Sets url for this item. Also updates the visible text to the filename/directory of the url, if no description is set.

See Also:
url()

setIcon

public void setIcon(java.lang.String icon,
                    int group)
sets the icon for this item. See KIconLoader for a description of the icon groups.

See Also:
icon()

setIcon

public void setIcon(java.lang.String icon)

setDescription

public void setDescription(java.lang.String desc)
Sets the description of this item that will be shown as item-text.

See Also:
description()

setToolTip

public void setToolTip(java.lang.String tip)
Sets a tooltip to be used for this item.

See Also:
toolTip()

sizeHint

public org.kde.qt.QSize sizeHint()
returns the preferred size of this item


width

public int width(org.kde.qt.QListBox arg1)
returns the width of this item.

Overrides:
width in class org.kde.qt.QListBoxPixmap

height

public int height(org.kde.qt.QListBox arg1)
returns the height of this item.

Overrides:
height in class org.kde.qt.QListBoxPixmap

url

public KURL url()
returns the url of this item.

See Also:
setURL(org.kde.koala.KURL)

description

public java.lang.String description()
returns the description of this item.

See Also:
setDescription(java.lang.String)

icon

public java.lang.String icon()
returns the icon of this item.

See Also:
setIcon(java.lang.String, int)

toolTip

public java.lang.String toolTip()
returns the tooltip of this item.

See Also:
setToolTip(java.lang.String)

iconGroup

public int iconGroup()
returns the icon-group of this item (determines icon-effects).

See Also:
setIcon(java.lang.String, int)

pixmap

public org.kde.qt.QPixmap pixmap()
returns the pixmap of this item.

Overrides:
pixmap in class org.kde.qt.QListBoxPixmap

setApplicationLocal

public void setApplicationLocal(boolean local)
Makes this item a local or global one. This has only an effect on persistent items of course.

See Also:
isPersistent(), applicationLocal()

applicationLocal

public boolean applicationLocal()
returns whether this is a global item or a local one. KURLBar can differentiate between global and local items (only for the current application) for easy extensiblity.

See Also:
setApplicationLocal(boolean)

isPersistent

public boolean isPersistent()
returns whether this item is persistent (via KURLBar.writeConfig() and KURLBar.readConfig()) or not.


paint

protected void paint(org.kde.qt.QPainter p)
Overrides:
paint in class org.kde.qt.QListBoxPixmap

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class org.kde.qt.QListBoxPixmap
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

Overrides:
dispose in class org.kde.qt.QListBoxPixmap

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

Overrides:
isDisposed in class org.kde.qt.QListBoxPixmap