com.groovemanager.gui.custom
Class InfoGroup

java.lang.Object
  extended by com.groovemanager.gui.custom.InfoGroup

public class InfoGroup
extends java.lang.Object

An InfoGroup represents a Composite containing a List of Labels and ProgressBars showing some status information. Multiple InfoGroup instances can be added to a InfoGroupContainer.

Author:
Manu Robledo

Field Summary
private  org.eclipse.swt.widgets.Button close
          The Button for closing this InfoGroup
private  org.eclipse.swt.graphics.Image closeImg
          The Image used for the close button
private  org.eclipse.swt.widgets.Composite comp
          The Composite containing the group and the button for closing this InfoGroup
private  InfoGroupContainer container
          The InfoGroupContainer containing this InfoGroup
private  FileManager fileManager
          The FileManager used for finding the needed image files
private  org.eclipse.swt.widgets.Group group
          The Group that contains the status elements
private  InfoGroup last
          The InfoGroup before this one in an InfoGroupContainer
private  java.lang.String name
          This InfoGroupīs name
private  InfoGroup next
          The InfoGroup following this one in an InfoGroupContainer
private  boolean open
          Indicates if this InfoGroup is currently opened
 
Constructor Summary
InfoGroup(InfoGroupContainer cont, java.lang.String name)
          Constructs a new InfoGroup with the given name that will be displayed in the given InfoGroupContainer using the default FileManager
InfoGroup(InfoGroupContainer cont, java.lang.String name, FileManager fileManager)
          Constructs a new InfoGroup with the given name that will be displayed in the given InfoGroupContainer using the given FileManager
 
Method Summary
 org.eclipse.swt.widgets.Label addLabel(java.lang.String description)
          Add a new row to this InfoGroup with the given description on the left and a new Label on the right
 org.eclipse.swt.widgets.Label addLabel(java.lang.String description, java.lang.String content)
          Add a new row to this InfoGroup with the given description on the left and a new Label on the right containing the given content
 org.eclipse.swt.widgets.ProgressBar addProgBar(java.lang.String description)
          Add a new row to this InfoGroup with the given description on the left and a new ProgressBar on the right
 org.eclipse.swt.widgets.Text addText(java.lang.String description)
          Add a new row to this InfoGroup with the given description on the left and a new read-only Text field on the right
 org.eclipse.swt.widgets.Text addText(java.lang.String description, java.lang.String content)
          Add a new row to this InfoGroup with the given description on the left and a new read-only Text field on the right containing the given content
(package private)  void close()
          Hide this InfoGroup
 org.eclipse.swt.widgets.Composite getComposite()
          Get this InfoGroupīs main Composite
(package private)  InfoGroup getLast()
          Get the InfoGroup before this one in the InfoGroupContainer
 java.lang.String getName()
          Get this InfoGroupīs name
(package private)  InfoGroup getNext()
          Get the InfoGroup following this one in the InfoGroupContainer
(package private)  void open()
          Show this InfoGroup
(package private)  void setLast(InfoGroup g)
          Set the element before this one in the InfoGroupContainer
 void setName(java.lang.String n)
          Get this InfoGroupīs name
(package private)  void setNext(InfoGroup g)
          Set the element following this one in the InfoGroupContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

close

private org.eclipse.swt.widgets.Button close
The Button for closing this InfoGroup


closeImg

private org.eclipse.swt.graphics.Image closeImg
The Image used for the close button


comp

private org.eclipse.swt.widgets.Composite comp
The Composite containing the group and the button for closing this InfoGroup


container

private InfoGroupContainer container
The InfoGroupContainer containing this InfoGroup


fileManager

private FileManager fileManager
The FileManager used for finding the needed image files


group

private org.eclipse.swt.widgets.Group group
The Group that contains the status elements


last

private InfoGroup last
The InfoGroup before this one in an InfoGroupContainer


name

private java.lang.String name
This InfoGroupīs name


next

private InfoGroup next
The InfoGroup following this one in an InfoGroupContainer


open

private boolean open
Indicates if this InfoGroup is currently opened

Constructor Detail

InfoGroup

public InfoGroup(InfoGroupContainer cont,
                 java.lang.String name)
Constructs a new InfoGroup with the given name that will be displayed in the given InfoGroupContainer using the default FileManager

Parameters:
cont - The InfoGroupContainer that should contain this InfoGroup
name - The name of the InfoGroup

InfoGroup

public InfoGroup(InfoGroupContainer cont,
                 java.lang.String name,
                 FileManager fileManager)
Constructs a new InfoGroup with the given name that will be displayed in the given InfoGroupContainer using the given FileManager

Parameters:
cont - The InfoGroupContainer that should contain this InfoGroup
name - The name of the InfoGroup
fileManager - The FileManager to use for locating the needed image files
Method Detail

addLabel

public org.eclipse.swt.widgets.Label addLabel(java.lang.String description)
Add a new row to this InfoGroup with the given description on the left and a new Label on the right

Parameters:
description - The text describing the new element
Returns:
The new created Label

addLabel

public org.eclipse.swt.widgets.Label addLabel(java.lang.String description,
                                              java.lang.String content)
Add a new row to this InfoGroup with the given description on the left and a new Label on the right containing the given content

Parameters:
description - The text describing the new element
content - The initial content of the Label
Returns:
The new created Label

addProgBar

public org.eclipse.swt.widgets.ProgressBar addProgBar(java.lang.String description)
Add a new row to this InfoGroup with the given description on the left and a new ProgressBar on the right

Parameters:
description - The text describing the new element
Returns:
The new created ProgressBar

addText

public org.eclipse.swt.widgets.Text addText(java.lang.String description)
Add a new row to this InfoGroup with the given description on the left and a new read-only Text field on the right

Parameters:
description - The text describing the new element
Returns:
The new created Text field

addText

public org.eclipse.swt.widgets.Text addText(java.lang.String description,
                                            java.lang.String content)
Add a new row to this InfoGroup with the given description on the left and a new read-only Text field on the right containing the given content

Parameters:
description - The text describing the new element
content - The initial content of the Text field
Returns:
The new created Text field

close

void close()
Hide this InfoGroup


getComposite

public org.eclipse.swt.widgets.Composite getComposite()
Get this InfoGroupīs main Composite

Returns:
This InfoGroupīs main Composite

getLast

InfoGroup getLast()
Get the InfoGroup before this one in the InfoGroupContainer

Returns:
The InfoGroup before this one

getName

public java.lang.String getName()
Get this InfoGroupīs name

Returns:
This InfoGroupīs name

getNext

InfoGroup getNext()
Get the InfoGroup following this one in the InfoGroupContainer

Returns:
The InfoGroup after this one

open

void open()
Show this InfoGroup


setLast

void setLast(InfoGroup g)
Set the element before this one in the InfoGroupContainer

Parameters:
g - The Group before this one

setName

public void setName(java.lang.String n)
Get this InfoGroupīs name

Parameters:
n - This InfoGroupīs name

setNext

void setNext(InfoGroup g)
Set the element following this one in the InfoGroupContainer

Parameters:
g - The Group following this one