Back to index

wims  3.65+svn20090927
Public Member Functions | Static Public Member Functions | Public Attributes | Package Attributes | Private Member Functions
rene.gui.IconBar Class Reference

This panel displays icons and reacts on mouse actions. More...

Inheritance diagram for rene.gui.IconBar:
Inheritance graph
[legend]
Collaboration diagram for rene.gui.IconBar:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IconBar (Frame f, boolean traversefocus)
 IconBar (Frame f)
void forceRepaint ()
 Do not know, if this is necessary.
void keyPressed (KeyEvent e)
void keyReleased (KeyEvent e)
void keyTyped (KeyEvent e)
Object getIcon (int n)
void focusGained (FocusEvent e)
void focusLost (FocusEvent e)
void setFocus (int n, boolean flag)
void addLeft (String name)
 Add an icon.
void addLeft (BasicIcon i)
void addRight (String name)
 Add an icon at the right end.
void addRight (BasicIcon i)
void addToggleLeft (String name)
 Add a toggle icon.
void addToggleRight (String name)
void addOnOffLeft (String name)
 Add a toggle icon.
void addOnOffRight (String name)
void addToggleGroupLeft (String names[], String breaks[])
 Add a complete groupe of toggle items.
void addToggleGroupRight (String names[], String breaks[])
void addToggleGroupLeft (String names[])
void addToggleGroupRight (String names[])
void addToggleGroupLeft (String name, int n)
void addToggleGroupRight (String name, int n)
void addToggleGroupLeft (String name, Color colors[])
void addToggleGroupRight (String name, Color colors[])
void addSeparatorLeft ()
 Add a separator.
void addSeparatorRight ()
void addMultipleIconLeft (String name, int number)
 Add a multiple icon (can toggle between the icons)
void addMultipleIconRight (String name, int number)
void addMultipleStringIconLeft (String name, String s[])
 Add a multiple icon (can toggle between the icons)
void addMultipleStringIconRight (String name, String s[])
void addMultipleToggleIconLeft (String name, int number)
 Add a multiple icon (can toggle between the icons)
void addMultipleToggleIconRight (String name, int number)
void addColorIconLeft (String name, Color colors[])
 Add a multiple icon (can toggle between the colors)
void addColorIconRight (String name, Color colors[])
void addStateLeft (String name)
 Add a state display at the left end.
void addStateRight (String name)
void doLayout ()
 Override the layout and arange the icons from the left and the right.
void setShifted (boolean flag)
Dimension getPreferredSize ()
 Override the preferred sizes.
Dimension getMinimumSize ()
void setIconBarListener (IconBarListener l)
void removeIconBarListener (IconBarListener l)
void iconPressed (String name, boolean shift, boolean control)
boolean isShiftPressed ()
boolean isControlPressed ()
void clearShiftControl ()
synchronized void displayHelp (IconBarElement i, String text)
synchronized void removeHelp ()
void setEnabled (String name, boolean flag)
 Enable the tool with the specified name.
void toggle (String name)
 Select.
boolean have (String name)
 Have an Icon?
void unselect (String name)
 Deselect all icons in the group of an icon.
void toggle (String name, int n)
 Toggle an item of an item group (known by name and number).
void setState (String name, boolean flag)
 Set the state of a single toggle icon.
boolean getState (String name)
 Get the state of the specified toggle icon.
int getToggleState (String name)
 Return the state of a toggle icon.
int getMultipleState (String name)
 Get the state of the specified multiple icon.
void setMultipleState (String name, int state)
 Set the state of the specified multiple icon.
boolean isSet (String name)
 See, if the specific icon has been set.
void unset (String name)
 Set the specific icon to unset.
void getKey (KeyEvent e)
void setSize (int size)
void removeAll ()
String getHelp (String name)
 Overwrite in children!
void iconPressed (String name)

Static Public Member Functions

static void main (String args[])

Public Attributes

final int Offset = 2
String Resource = "/"
boolean TraverseFocus = true
boolean UseSize = true
boolean Vertical = false

Package Attributes

Vector Left = new Vector()
Vector Right = new Vector()
int W
Frame F
int Focus = 0
boolean Overflow = false
boolean Shifted = false
OverflowButton OB
int OverflowX
IconBarListener L = null
boolean Shift
boolean Control
Window WHelp = null

Private Member Functions

BasicIcon find (String name)

Detailed Description

This panel displays icons and reacts on mouse actions.

It can also interpret key strokes to traverse the icons.

Definition at line 827 of file IconBar.java.


Constructor & Destructor Documentation

rene.gui.IconBar.IconBar ( Frame  f,
boolean  traversefocus 
) [inline]

Definition at line 839 of file IconBar.java.

       {      F=f; TraverseFocus=traversefocus;
              if (Global.ControlBackground!=null)
                     setBackground(Global.ControlBackground);
              else setBackground(SystemColor.menu);
              Resource=Global.getParameter("iconpath","");
              BasicIcon.Size=Global.getParameter("iconsize",20);
              setLayout(null);
              W=Offset*2;
              addKeyListener(this);
              if (TraverseFocus) addFocusListener(this);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

rene.gui.IconBar.IconBar ( Frame  f) [inline]

Definition at line 851 of file IconBar.java.

       {      this(f,true);
       }      

Member Function Documentation

void rene.gui.IconBar.addColorIconLeft ( String  name,
Color  colors[] 
) [inline]

Add a multiple icon (can toggle between the colors)

Definition at line 1078 of file IconBar.java.

       {      addLeft(new ColorIcon(this,name,colors));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addColorIconRight ( String  name,
Color  colors[] 
) [inline]

Definition at line 1081 of file IconBar.java.

       {      addRight(new ColorIcon(this,name,colors));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addLeft ( String  name) [inline]

Add an icon.

Definition at line 950 of file IconBar.java.

       {      addLeft(new IconWithGif(this,name));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addLeft ( BasicIcon  i) [inline]

Definition at line 953 of file IconBar.java.

       {      Left.addElement(i);
              add(i);
              W+=i.width()+Offset;
       }

Here is the call graph for this function:

void rene.gui.IconBar.addMultipleIconLeft ( String  name,
int  number 
) [inline]

Add a multiple icon (can toggle between the icons)

Definition at line 1048 of file IconBar.java.

       {      addLeft(new MultipleIcon(this,name,number));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addMultipleIconRight ( String  name,
int  number 
) [inline]

Definition at line 1051 of file IconBar.java.

       {      addRight(new MultipleIcon(this,name,number));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addMultipleStringIconLeft ( String  name,
String  s[] 
) [inline]

Add a multiple icon (can toggle between the icons)

Definition at line 1058 of file IconBar.java.

       {      addLeft(new MultipleStringIcon(this,name,s));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addMultipleStringIconRight ( String  name,
String  s[] 
) [inline]

Definition at line 1061 of file IconBar.java.

       {      addRight(new MultipleStringIcon(this,name,s));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addMultipleToggleIconLeft ( String  name,
int  number 
) [inline]

Add a multiple icon (can toggle between the icons)

Definition at line 1068 of file IconBar.java.

       {      addLeft(new MultipleToggleIcon(this,name,number));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addMultipleToggleIconRight ( String  name,
int  number 
) [inline]

Definition at line 1071 of file IconBar.java.

       {      addRight(new MultipleToggleIcon(this,name,number));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addOnOffLeft ( String  name) [inline]

Add a toggle icon.

Definition at line 984 of file IconBar.java.

       {      addLeft(new OnOffIcon(this,name));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addOnOffRight ( String  name) [inline]

Definition at line 987 of file IconBar.java.

       {      addRight(new OnOffIcon(this,name));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addRight ( String  name) [inline]

Add an icon at the right end.

Definition at line 962 of file IconBar.java.

       {      addRight(new IconWithGif(this,name));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addRight ( BasicIcon  i) [inline]

Definition at line 965 of file IconBar.java.

       {      Right.addElement(i);
              add(i);
              W+=i.width()+Offset;
       }

Here is the call graph for this function:

Add a separator.

Definition at line 1028 of file IconBar.java.

       {      if (Left.size()==0) return;
              if (Left.lastElement() instanceof Separator) return;
              Separator s=new Separator(this);
              Left.addElement(s);
              add(s);
              W+=s.width()+Offset;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1036 of file IconBar.java.

       {      if (Right.size()==0) return;
              if (Right.lastElement() instanceof Separator) return;
              Separator s=new Separator(this);
              Right.addElement(s);
              add(s);
              W+=s.width()+Offset;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addStateLeft ( String  name) [inline]

Add a state display at the left end.

Definition at line 1088 of file IconBar.java.

       {      addLeft(new StateDisplay(this,name));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addStateRight ( String  name) [inline]

Definition at line 1091 of file IconBar.java.

       {      addRight(new StateDisplay(this,name));
       }

Here is the call graph for this function:

void rene.gui.IconBar.addToggleGroupLeft ( String  names[],
String  breaks[] 
) [inline]

Add a complete groupe of toggle items.

Definition at line 994 of file IconBar.java.

       {      IconGroup g=new IconGroup(this,names,breaks);
              g.addLeft();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addToggleGroupLeft ( String  names[]) [inline]

Definition at line 1002 of file IconBar.java.

       {      addToggleGroupLeft(names,names);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addToggleGroupLeft ( String  name,
int  n 
) [inline]

Definition at line 1008 of file IconBar.java.

       {      IconGroup g=new IconGroup(this,name,n);
              g.addLeft();
       }

Here is the call graph for this function:

void rene.gui.IconBar.addToggleGroupLeft ( String  name,
Color  colors[] 
) [inline]

Definition at line 1016 of file IconBar.java.

       {      IconGroup g=new IconGroup(this,name,colors);
              g.addLeft();
       }

Here is the call graph for this function:

void rene.gui.IconBar.addToggleGroupRight ( String  names[],
String  breaks[] 
) [inline]

Definition at line 998 of file IconBar.java.

       {      IconGroup g=new IconGroup(this,names,breaks);
              g.addRight();
       }

Here is the call graph for this function:

void rene.gui.IconBar.addToggleGroupRight ( String  names[]) [inline]

Definition at line 1005 of file IconBar.java.

       {      addToggleGroupRight(names,names);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addToggleGroupRight ( String  name,
int  n 
) [inline]

Definition at line 1012 of file IconBar.java.

       {      IconGroup g=new IconGroup(this,name,n);
              g.addRight();
       }

Here is the call graph for this function:

void rene.gui.IconBar.addToggleGroupRight ( String  name,
Color  colors[] 
) [inline]

Definition at line 1020 of file IconBar.java.

       {      IconGroup g=new IconGroup(this,name,colors);
              g.addRight();
       }

Here is the call graph for this function:

void rene.gui.IconBar.addToggleLeft ( String  name) [inline]

Add a toggle icon.

Definition at line 974 of file IconBar.java.

       {      addLeft(new ToggleIcon(this,name));
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.addToggleRight ( String  name) [inline]

Definition at line 977 of file IconBar.java.

       {      addRight(new ToggleIcon(this,name));
       }

Here is the call graph for this function:

Definition at line 1212 of file IconBar.java.

{ Shift=Control=false; }
synchronized void rene.gui.IconBar.displayHelp ( IconBarElement  i,
String  text 
) [inline]

Definition at line 1218 of file IconBar.java.

       {      if (F==null || WHelp!=null) return;
              Point P=i.getPosition();
              WHelp=new Window(F);
              Panel p=new Panel();
              StringTokenizer t=new StringTokenizer(text,"+");
              p.setLayout(new GridLayout(0,1));
              while (t.hasMoreTokens())
              {      p.add(new MyLabel(t.nextToken()));
              }
              WHelp.add("Center",p);
              WHelp.pack();
              Dimension d=WHelp.getSize();
              Dimension ds=getToolkit().getScreenSize();
              int x=P.x,y=P.y+i.width()+10;
              if (x+d.width>ds.width) x=ds.width-d.width;
              if (y+d.height>ds.height) y=P.y-i.width()-d.height;
              WHelp.setLocation(x,y);
              WHelp.setBackground(new Color(255,255,220));
              WHelp.setForeground(Color.black);
              WHelp.setVisible(true);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.doLayout ( ) [inline]

Override the layout and arange the icons from the left and the right.

Definition at line 1103 of file IconBar.java.

       {      if (OB!=null)
              {      remove(OB); OB=null;
              }
              if (Vertical) 
              {      int x;
                     x=getSize().height;
                     for (int k=0; k<Right.size(); k++)
                     {      IconBarElement i=(IconBarElement)Right.elementAt(k);
                            x-=i.width();
                            i.setPosition(2,x);
                            x-=Offset;
                     }
                     int xmax=x;
                     x=0;
                     for (int k=0; k<Left.size(); k++)
                     {      IconBarElement i=(IconBarElement)Left.elementAt(k);
                            i.setPosition(2,x);
                            x+=i.width();
                            x+=Offset;
                            if (x+IconWithGif.Size>xmax) x=-1000;
                     }
              }
              else
              {      int x;
                     x=getSize().width;
                     for (int k=0; k<Right.size(); k++)
                     {      IconBarElement i=(IconBarElement)Right.elementAt(k);
                            x-=i.width();
                            i.setPosition(x,2);
                            x-=Offset;
                     }
                     int xmax=x;
                     x=0;
                     for (int k=0; k<Left.size(); k++)
                     {      IconBarElement i=(IconBarElement)Left.elementAt(k);
                            i.setPosition(x,2);
                            x+=i.width();
                            x+=Offset;
                            if (x+IconWithGif.Size>xmax-10 && k<Left.size()-1)
                            {      Overflow=true; OverflowX=x;
                                   OB=new OverflowButton(this,Shifted);
                                   add(OB);
                                   OB.setSize(10,BasicIcon.Size);
                                   OB.setLocation(xmax-10-Offset,2);
                                   if (!Shifted)
                                   {      x=-1000;      
                                   }
                                   else
                                   {      x=xmax-10-2*Offset;
                                          for (int l=Left.size()-1; l>=0; l--)
                                          {      i=(IconBarElement)Left.elementAt(l);
                                                 x-=i.width();
                                                 i.setPosition(x,2);
                                                 x-=Offset;
                                                 if (x-IconWithGif.Size<0) x-=1000;
                                          }
                                          break;
                                   }
                            }
                     }
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

BasicIcon rene.gui.IconBar.find ( String  name) [inline, private]

Definition at line 1248 of file IconBar.java.

       {      int k;
              for (k=0; k<Left.size(); k++)
              {      try
                     {      BasicIcon i=(BasicIcon)Left.elementAt(k);
                            if (i.getName().equals(name)) return i;
                     }
                     catch (Exception e) {}
              }
              for (k=0; k<Right.size(); k++)
              {      try
                     {      BasicIcon i=(BasicIcon)Right.elementAt(k);
                            if (i.getName().equals(name)) return i;
                     }
                     catch (Exception e) {}
              }
              return null;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.focusGained ( FocusEvent  e) [inline]

Definition at line 924 of file IconBar.java.

       {      if (TraverseFocus) setFocus(Focus,true);
       }

Here is the call graph for this function:

void rene.gui.IconBar.focusLost ( FocusEvent  e) [inline]

Definition at line 927 of file IconBar.java.

       {      if (TraverseFocus) setFocus(Focus,false);
       }

Here is the call graph for this function:

void rene.gui.IconBar.forceRepaint ( ) [inline]

Do not know, if this is necessary.

But sometimes the icons do not repaint after an update.

Definition at line 859 of file IconBar.java.

       {      super.repaint();
              Enumeration e=Left.elements();
              while (e.hasMoreElements())
              {      BasicIcon i=(BasicIcon)e.nextElement();
                     i.repaint();
              }
              e=Right.elements();
              while (e.hasMoreElements())
              {      BasicIcon i=(BasicIcon)e.nextElement();
                     i.repaint();
              }
       }
String rene.gui.IconBar.getHelp ( String  name) [inline]

Overwrite in children!

Parameters:
name
Returns:
Help text

Definition at line 1423 of file IconBar.java.

       {      return "";
       }

Here is the caller graph for this function:

Object rene.gui.IconBar.getIcon ( int  n) [inline]

Definition at line 919 of file IconBar.java.

       {      if (n<Left.size()) return Left.elementAt(n);
              else return Right.elementAt(Right.size()-1-(n-Left.size()));
       }

Here is the caller graph for this function:

void rene.gui.IconBar.getKey ( KeyEvent  e) [inline]

Definition at line 1397 of file IconBar.java.

       {      processKeyEvent(e);
       }

Here is the caller graph for this function:

Dimension rene.gui.IconBar.getMinimumSize ( ) [inline]

Definition at line 1185 of file IconBar.java.

       {      return getPreferredSize();
       }

Here is the call graph for this function:

int rene.gui.IconBar.getMultipleState ( String  name) [inline]

Get the state of the specified multiple icon.

Definition at line 1344 of file IconBar.java.

       {      int k;
              for (k=0; k<Left.size(); k++)
              {      IconBarElement i=(IconBarElement)Left.elementAt(k);
                     if (i.getName().equals(name) && i instanceof MultipleIcon)
                     {      return ((MultipleIcon)i).getSelected();
                     }
              }
              for (k=0; k<Right.size(); k++)
              {      IconBarElement i=(IconBarElement)Right.elementAt(k);
                     if (i.getName().equals(name) && i instanceof MultipleIcon)
                     {      return ((MultipleIcon)i).getSelected();
                     }
              }
              return -1;
       }

Here is the call graph for this function:

Dimension rene.gui.IconBar.getPreferredSize ( ) [inline]

Override the preferred sizes.

Definition at line 1175 of file IconBar.java.

       {      if (Vertical)
              {      if (!UseSize) return new Dimension(IconWithGif.Size+4,10);
                     return new Dimension(IconWithGif.Size+4,W+10);
              }
              else
              {      if (!UseSize) return new Dimension(10,IconWithGif.Size+4);
                     return new Dimension(W+10,IconWithGif.Size+4);
              }
       }

Here is the caller graph for this function:

boolean rene.gui.IconBar.getState ( String  name) [inline]

Get the state of the specified toggle icon.

Definition at line 1322 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon==null || !(icon instanceof ToggleIcon)) return false;
              return ((ToggleIcon)icon).getState();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

int rene.gui.IconBar.getToggleState ( String  name) [inline]

Return the state of a toggle icon.

Definition at line 1331 of file IconBar.java.

       {      BasicIcon icon=find(name+0);
              if (icon==null || !(icon instanceof ToggleIcon)) return -1;
              int n=((ToggleIcon)icon).countPeers();
              for (int i=0; i<n; i++)
              {      if (getState(name+i)) return i;
              }
              return -1;
       }

Here is the call graph for this function:

Here is the caller graph for this function:

boolean rene.gui.IconBar.have ( String  name) [inline]

Have an Icon?

Definition at line 1288 of file IconBar.java.

       {      return find(name)!=null;
       }

Here is the call graph for this function:

void rene.gui.IconBar.iconPressed ( String  name,
boolean  shift,
boolean  control 
) [inline]

Definition at line 1204 of file IconBar.java.

       {      Shift=shift; Control=control;
              removeHelp();
              if (L!=null) L.iconPressed(name);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.iconPressed ( String  name) [inline]

Implements rene.gui.IconBarListener.

Definition at line 1461 of file IconBar.java.

       {      System.out.println(name);
       }

Definition at line 1211 of file IconBar.java.

{ return Control; }
boolean rene.gui.IconBar.isSet ( String  name) [inline]

See, if the specific icon has been set.

Definition at line 1383 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon==null) return false;
              return icon.isSet();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1210 of file IconBar.java.

{ return Shift; }

Here is the caller graph for this function:

void rene.gui.IconBar.keyPressed ( KeyEvent  e) [inline]

Definition at line 873 of file IconBar.java.

{}
void rene.gui.IconBar.keyReleased ( KeyEvent  e) [inline]

Definition at line 874 of file IconBar.java.

       {      switch (e.getKeyCode())
              {      case KeyEvent.VK_RIGHT :
                            setFocus(Focus,false);
                            Focus++;
                            if (Focus>=Left.size()+Right.size()) Focus=0;
                            while (!(getIcon(Focus) instanceof BasicIcon))
                            {      Focus++;
                                   if (Focus>=Left.size()+Right.size())
                                   {      Focus=0; break;
                                   }
                            }
                            setFocus(Focus,true);
                            break;
                     case KeyEvent.VK_LEFT :
                            setFocus(Focus,false);
                            Focus--;
                            if (Focus<0) Focus=Left.size()+Right.size()-1;
                            while (!(getIcon(Focus) instanceof BasicIcon))
                            {      Focus--;
                                   if (Focus<0)
                                   {      Focus=Left.size()+Right.size()-1;
                                          break;
                                   }
                            }
                            setFocus(Focus,true);
                            break;
                     case KeyEvent.VK_SPACE :
                            try
                            {      BasicIcon icon=(BasicIcon)getIcon(Focus);
                                   icon.mouseReleased(new MouseEvent(this,
                                          MouseEvent.MOUSE_RELEASED,0,0,0,0,1,false));
                            }
                            catch (Exception ex) {}
                            break;
              }
       }

Here is the call graph for this function:

void rene.gui.IconBar.keyTyped ( KeyEvent  e) [inline]

Definition at line 911 of file IconBar.java.

{}
static void rene.gui.IconBar.main ( String  args[]) [inline, static]

Definition at line 1427 of file IconBar.java.

       {      CloseFrame f=new CloseFrame("Test");
              IconBar IA=new IconBar(f);
              IA.Vertical=true;
              IA.setSize(30);
              IA.Resource="/icons/"; 
              IA.addLeft("back"); 
              IA.addLeft("undo"); 
              IA.addSeparatorLeft(); 
              IA.addOnOffLeft("grid"); 
              IA.addSeparatorLeft(); 
              IA.addToggleLeft("delete"); 
              IA.addSeparatorLeft();
              String tg[]={"zoom","draw","","rename","edit"}; 
              IA.addToggleGroupLeft(tg); 
              IA.addSeparatorLeft(); 
              IA.addMultipleToggleIconLeft("macro",3); 
              IA.addSeparatorLeft(); 
              String tga[]={"zoom","draw","rename","edit"}; 
              IA.addLeft(new PopupIcon(IA,tga));
              IA.addSeparatorLeft(); 
              String st[]={"A","B","C","D"}; 
              IA.addMultipleStringIconLeft("strings",st); 
              Color col[]={Color.BLACK,Color.RED,Color.GREEN};
              IA.addStateLeft("needsave");
              IA.addColorIconLeft("color",col); 
              f.add("Center",new IconBarPanel(
                     new Panel3D(IA),new Panel3D(new Panel())));
              f.pack();     
              f.center();
              IA.setIconBarListener(IA);
              f.setVisible(true);
       }

Here is the call graph for this function:

void rene.gui.IconBar.removeAll ( ) [inline]

Definition at line 1405 of file IconBar.java.

       {      Enumeration e=Left.elements();
              while (e.hasMoreElements())
              {      remove((BasicIcon)e.nextElement());
              }
              e=Right.elements();
              while (e.hasMoreElements())
              {      remove((BasicIcon)e.nextElement());
              }
              Left.removeAllElements();
              Right.removeAllElements();
       }
synchronized void rene.gui.IconBar.removeHelp ( ) [inline]

Definition at line 1241 of file IconBar.java.

       {      if (WHelp==null) return;
              WHelp.setVisible(false);
              WHelp.dispose();
              WHelp=null;
       }

Here is the caller graph for this function:

Definition at line 1198 of file IconBar.java.

       {      L=null;
       }
void rene.gui.IconBar.setEnabled ( String  name,
boolean  flag 
) [inline]

Enable the tool with the specified name.

Definition at line 1270 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon==null) return;
              icon.setEnabled(flag);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.setFocus ( int  n,
boolean  flag 
) [inline]

Definition at line 931 of file IconBar.java.

       {      if (!TraverseFocus) return;
              try
              {      if (n<Left.size())
                     {      BasicIcon icon=(BasicIcon)Left.elementAt(n);
                            icon.setFocus(flag);
                     }
                     else
                     {      BasicIcon icon=(BasicIcon)Right.elementAt(
                                   Right.size()-1-(n-Left.size()));
                            icon.setFocus(flag);
                     }
              }
              catch (Exception e) {}
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1194 of file IconBar.java.

       {      L=l;
       }

Here is the caller graph for this function:

void rene.gui.IconBar.setMultipleState ( String  name,
int  state 
) [inline]

Set the state of the specified multiple icon.

Definition at line 1364 of file IconBar.java.

       {      int k;
              for (k=0; k<Left.size(); k++)
              {      IconBarElement i=(IconBarElement)Left.elementAt(k);
                     if (i.getName().equals(name) && i instanceof MultipleIcon)
                     {      ((MultipleIcon)i).setSelected(state);
                     }
              }
              for (k=0; k<Right.size(); k++)
              {      IconBarElement i=(IconBarElement)Right.elementAt(k);
                     if (i.getName().equals(name) && i instanceof MultipleIcon)
                     {      ((MultipleIcon)i).setSelected(state);
                     }
              }
       }

Here is the call graph for this function:

void rene.gui.IconBar.setShifted ( boolean  flag) [inline]

Definition at line 1167 of file IconBar.java.

       {      Shifted=flag;
              doLayout();
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.setSize ( int  size) [inline]

Definition at line 1401 of file IconBar.java.

       {      BasicIcon.Size=size;
       }

Here is the caller graph for this function:

void rene.gui.IconBar.setState ( String  name,
boolean  flag 
) [inline]

Set the state of a single toggle icon.

Definition at line 1311 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon!=null && (icon instanceof ToggleIcon))
                     ((ToggleIcon)icon).setState(flag);
              if (icon!=null && (icon instanceof MultipleToggleIcon))
                     ((MultipleToggleIcon)icon).setState(flag);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.toggle ( String  name) [inline]

Select.

Definition at line 1279 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon==null || !(icon instanceof ToggleIcon)) return;
              ((ToggleIcon)icon).setState(true);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.toggle ( String  name,
int  n 
) [inline]

Toggle an item of an item group (known by name and number).

Definition at line 1304 of file IconBar.java.

       {      toggle(name+n);
       }

Here is the call graph for this function:

Here is the caller graph for this function:

void rene.gui.IconBar.unselect ( String  name) [inline]

Deselect all icons in the group of an icon.

Definition at line 1295 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon==null || !(icon instanceof ToggleIcon)) return;
              ((ToggleIcon)icon).unselect();
       }

Here is the call graph for this function:

void rene.gui.IconBar.unset ( String  name) [inline]

Set the specific icon to unset.

Definition at line 1392 of file IconBar.java.

       {      BasicIcon icon=find(name);
              if (icon!=null) icon.unset();
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 1202 of file IconBar.java.

Frame rene.gui.IconBar.F [package]

Definition at line 831 of file IconBar.java.

int rene.gui.IconBar.Focus = 0 [package]

Definition at line 834 of file IconBar.java.

Definition at line 1192 of file IconBar.java.

Vector rene.gui.IconBar.Left = new Vector() [package]

Definition at line 829 of file IconBar.java.

Definition at line 1096 of file IconBar.java.

final int rene.gui.IconBar.Offset = 2

Definition at line 832 of file IconBar.java.

Definition at line 1095 of file IconBar.java.

Definition at line 1097 of file IconBar.java.

Definition at line 833 of file IconBar.java.

Vector rene.gui.IconBar.Right = new Vector() [package]

Definition at line 829 of file IconBar.java.

Definition at line 1202 of file IconBar.java.

Definition at line 1095 of file IconBar.java.

Definition at line 835 of file IconBar.java.

Definition at line 836 of file IconBar.java.

Definition at line 837 of file IconBar.java.

int rene.gui.IconBar.W [package]

Definition at line 830 of file IconBar.java.

Window rene.gui.IconBar.WHelp = null [package]

Definition at line 1216 of file IconBar.java.


The documentation for this class was generated from the following file: