panel.c File Reference

Implementation of the Panel functions. More...

#include "component.h"
#include "container.h"
#include "panel.h"

Include dependency graph for panel.c:

Go to the source code of this file.

Functions

void addPanelComponent (Panel *panel, jobject comp)
 Adds a Component to the Panel.
jobject addPanelComponentListener (Panel *panel, void(*func)(jint, jobject))
 Adds a ComponentListener for a Panel to call back the specified function.
void addPanelComponentWithConstraint (Panel *panel, jobject comp, jobject constraint)
 Adds a Component to the Panel at a position.
MouseListener addPanelMouseListener (Panel *panel, void(*func)(jint, Component, jint, jint, jint, jint))
 Adds a MouseListener for a Panel to call back the specified function.
void createPanel_ (Panel *panel)
 Creates the Panel by getting the Java Panel-Class, the method ids and createing a new Java Panel-Object.
void createPanelC (Panel_ *panel)
 Function is called when working with C and calling the function createPanel.
void createPanelCPP (PanelCPP_ *panel)
 Function is called when working with C++ and calling the function createPanel.
void deletePanel_ (Panel *panel)
 Deletes the Panel by deleting the global references.
void deletePanelC (Panel_ *panel)
 Function is called when working with C and calling the function deletePanel.
void deletePanelCPP (PanelCPP_ *panel)
 Function is called when working with C++ and calling the function deletePanel.
Color getPanelBackgroundColor (Panel *panel)
 Gets the background color of the Panel.
Color getPanelForegroundColor (Panel *panel)
 Gets the foreground color of the Panel.
jint getPanelHeight (Panel *panel)
 Gets the height of the Panel.
jobject getPanelObject (Panel *panel)
 Gets the reference to the java panel object.
jint getPanelWidth (Panel *panel)
 Gets the width of the Panel.
jint getPanelX (Panel *panel)
 Gets the X-Pos of the Panel.
jint getPanelY (Panel *panel)
 Gets the Y-Pos of the Panel.
void initPanel_ (Panel_ *panel)
 Initializes the Panel_ structure by setting the function pointers.
void removePanelComponentListener (Panel *panel, jobject cl)
 Removes a ComponentListener from a Panel and deletes the global reference to the ComponentListener.
void removePanelMouseListener (Panel *panel, MouseListener ml)
 Removes a MouseListener from a Panel and deletes the global reference to the MouseListener.
void setPanelBackgroundColor (Panel *panel, const Color c)
 Sets the background color of the Panel.
void setPanelForegroundColor (Panel *panel, const Color c)
 Sets the foreground color of the Panel.
void setPanelLayout (Panel *panel, jobject layoutmanager)
 Sets a LayoutManager to the Panel.
void setPanelLocation (Panel *panel, jint x, jint y)
 Sets the location of the Panel.
void setPanelSize (Panel *panel, jint width, jint height)
 Sets Size of the Panel.


Detailed Description

Implementation of the Panel functions.

A Panel is a container where you can place control elements. A Panel has the FlowLayout as standard LayoutManager.

Author:
Stefan Gruber
Date:
19.02.2005

Definition in file panel.c.


Function Documentation

void addPanelComponent Panel panel,
jobject  comp
 

Adds a Component to the Panel.

Parameters:
panel - The panel to draw on.
comp - The Component to add.
See also:
addPanelComponentWithConstraint(Panel* panel, jobject comp, jobject constraint)

Definition at line 238 of file panel.c.

jobject addPanelComponentListener Panel panel,
void(*)(jint, jobject)  func
 

Adds a ComponentListener for a Panel to call back the specified function.

For more information see: addComponentListener

Parameters:
panel - The panel to add the listener to.
func - The function to call back.
Returns:
the created ComponentListener object.
See also:
removePanelComponentListener(Panel* panel, jobject cl)

Definition at line 203 of file panel.c.

void addPanelComponentWithConstraint Panel panel,
jobject  comp,
jobject  constraint
 

Adds a Component to the Panel at a position.

Parameters:
panel - The panel to draw on.
comp - The Component to add.
constraint - The constraint for the LayoutManager.
See also:
addPanelComponent(Panel* panel, jobject comp)

Definition at line 251 of file panel.c.

MouseListener addPanelMouseListener Panel panel,
void(*)(jint, Component, jint, jint, jint, jint)  func
 

Adds a MouseListener for a Panel to call back the specified function.

For more information see: addMouseListener

Parameters:
panel - The panel to add the listener to.
func - The function to call back.
Returns:
the created MouseListener object.
See also:
removePanelMouseListener(Panel* panel, MouseListener ml)

Definition at line 175 of file panel.c.

void createPanel_ Panel panel  ) 
 

Creates the Panel by getting the Java Panel-Class, the method ids and createing a new Java Panel-Object.

Parameters:
panel - The Panel to create.

Definition at line 289 of file panel.c.

void createPanelC Panel_ panel  ) 
 

Function is called when working with C and calling the function createPanel.

It initializes the Panel_ structure.

Parameters:
panel - A pointer to a Panel_ structure.

Definition at line 313 of file panel.c.

void createPanelCPP PanelCPP_ panel  ) 
 

Function is called when working with C++ and calling the function createPanel.

It initializes the PanelCPP_ structure.

Parameters:
panel - A pointer to a PanelCPP_ structure.

Definition at line 301 of file panel.c.

void deletePanel_ Panel panel  ) 
 

Deletes the Panel by deleting the global references.

Parameters:
panel - A pointer to a panel.

Definition at line 323 of file panel.c.

void deletePanelC Panel_ panel  ) 
 

Function is called when working with C and calling the function deletePanel.

Parameters:
panel - A pointer to a Panel_ structure.

Definition at line 343 of file panel.c.

void deletePanelCPP PanelCPP_ panel  ) 
 

Function is called when working with C++ and calling the function deletePanel.

Parameters:
panel - A pointer to a PanelCPP_ structure.

Definition at line 333 of file panel.c.

Color getPanelBackgroundColor Panel panel  ) 
 

Gets the background color of the Panel.

Parameters:
panel - Pointer to the panel.
Returns:
the current color of th Panel as struct Color.
See also:
setPanelBackgroundColor(Panel* panel, Color c)

Definition at line 160 of file panel.c.

Color getPanelForegroundColor Panel panel  ) 
 

Gets the foreground color of the Panel.

Parameters:
panel - Pointer to the panel.
Returns:
the current color of th Panel as struct Color.
See also:
setPanelForegroundColor(Panel* panel, Color c)

Definition at line 135 of file panel.c.

jint getPanelHeight Panel panel  ) 
 

Gets the height of the Panel.

Parameters:
panel - Pointer to the panel.
Returns:
the current height of the Panel.
See also:
setPanelSize(Panel* panel, jint width, jint height)

getPanelWidth(Panel* panel)

Definition at line 68 of file panel.c.

jobject getPanelObject Panel panel  ) 
 

Gets the reference to the java panel object.

Parameters:
panel - Pointer to the panel.
Returns:
the panel object reference.

Definition at line 26 of file panel.c.

jint getPanelWidth Panel panel  ) 
 

Gets the width of the Panel.

Parameters:
panel - Pointer to the panel.
Returns:
the current width of the Panel.
See also:
setPanelSize(Panel* panel, jint width, jint height)

getPanelHeight(Panel* panel)

Definition at line 54 of file panel.c.

jint getPanelX Panel panel  ) 
 

Gets the X-Pos of the Panel.

Parameters:
panel - Pointer to the panel.
Returns:
the current X-Pos of the panel.
See also:
setPanelLocation(Panel* panel, jint x, jint y)

getPanelY(Panel* panel)

Definition at line 96 of file panel.c.

jint getPanelY Panel panel  ) 
 

Gets the Y-Pos of the Panel.

Parameters:
panel - Pointer to the panel.
Returns:
the current Y-Pos of the panel.
See also:
setPanelLocation(Panel* panel, jint x, jint y)

getPanelX(Panel* panel)

Definition at line 110 of file panel.c.

void initPanel_ Panel_ panel  ) 
 

Initializes the Panel_ structure by setting the function pointers.

Parameters:
panel - A pointer to a Panel_ structure.

Definition at line 260 of file panel.c.

void removePanelComponentListener Panel panel,
jobject  cl
 

Removes a ComponentListener from a Panel and deletes the global reference to the ComponentListener.

Parameters:
panel - The panel to remove the listener from.
cl - The ComponentListener to remove.
See also:
addPanelComponentListener(Panel* panel, void (*func)(jint, jobject))

Definition at line 216 of file panel.c.

void removePanelMouseListener Panel panel,
MouseListener  ml
 

Removes a MouseListener from a Panel and deletes the global reference to the MouseListener.

Parameters:
panel - The panel to remove the listener from.
ml - The MouseListener to remove.
See also:
addPanelMouseListener(Panel* panel, void (*func)(jint, Component, jint, jint, jint, jint))

Definition at line 188 of file panel.c.

void setPanelBackgroundColor Panel panel,
const Color  c
 

Sets the background color of the Panel.

Parameters:
panel - Pointer to the panel.
c - The new Color.
See also:
getPanelBackgroundColor(Panel* panel)

Definition at line 147 of file panel.c.

void setPanelForegroundColor Panel panel,
const Color  c
 

Sets the foreground color of the Panel.

Parameters:
panel - Pointer to the panel.
c - The new Color.
See also:
getPanelForegroundColor(Panel* panel)

Definition at line 122 of file panel.c.

void setPanelLayout Panel panel,
jobject  layoutmanager
 

Sets a LayoutManager to the Panel.

Parameters:
panel - The Container to add the Component to.
layoutmanager - The LayoutManager to set.

Definition at line 226 of file panel.c.

void setPanelLocation Panel panel,
jint  x,
jint  y
 

Sets the location of the Panel.

Parameters:
panel - Pointer to the panel.
x - New X-Pos.
y - New Y-Pos.
See also:
getPanelX(Panel* panel)

getPanelY(Panel* panel)

Definition at line 82 of file panel.c.

void setPanelSize Panel panel,
jint  width,
jint  height
 

Sets Size of the Panel.

Parameters:
panel - Pointer to the panel.
width - New width.
height - New height.
See also:
getPanelWidth(Panel* panel)

getPanelHeight(Panel* panel)

Definition at line 40 of file panel.c.


Generated on Sat Nov 19 14:11:14 2005 for GrubC by  doxygen 1.4.4