2.7.2 - Standard Icons - JdlStandardIcons

John W. Campbell

2.7.2.1 Introduction

This class provides a series of methods to return some standard icons (Mouse, Help, Printer) and cursors (Cross cursor) for use in JdlView objects.

Class, fields and methods:

Class Details
Accessible Fields
Icons
Create Cursor

2.7.2.2 Class Details

Package:
Jdl.JdlLib;
Class name:
JdlStandardIcons
Class definition:
public class JdlStandardIcons
Extends:
Object
Implements:
none
Actions:
none

2.7.2.3 Accessible Fields

No fields with public, package or protected access defined.

2.7.2.4 Icons

2.7.2.4.1 Introduction

This section contains methods for returning some standard icon images.

Methods:

Printer icon - createSmallPrinterIcon
Printer icon - createLargePrinterIcon
Help icon - createHelpIcon
Help icon - createSmallHelpIcon
Mouse icon - createMouseIcon

2.7.2.4.2 Printer icon - createSmallPrinterIcon

This method returns a 16x16 version of the printer icon.

Method Definition:
public static Image createSmallPrinterIcon(Component c)
Parameters List:
c
A Component object on which to base the image.
Method Return:
The small (16x16) printer icon image.

2.7.2.4.3 Printer icon - createLargePrinterIcon

This method returns a 32x32 version of the printer icon.

Method Definition:
public static Image createLargePrinterIcon(Component c)
Parameters List:
c
A Component object on which to base the image.
Method Return:
The small (32x32) printer icon image.

2.7.2.4.4 Help icon - createHelpIcon

This method returns a 32x32 icon image for a help button.

Method Definition:
public static Image createHelpIcon(Component c)
Parameters List:
c
A Component object on which to base the image.
Method Return:
The 'Help' icon image.

2.7.2.4.5 Help icon - createSmallHelpIcon

This method returns a 16x16 icon image for a help button.

Method Definition:
public static Image createSmallHelpIcon(Component c)
Parameters List:
c
A Component object on which to base the image.
Method Return:
The 'Help' icon image.

2.7.2.4.6 Mouse icon - createMouseIcon

This method returns a 32x32 icon image for mouse button 1, 2 or 3.

Method Definition:
public static Image createMouseIcon(Component c, int ibut)
Parameters List:
c
A Component object on which to base the images.
ibut
The mouse button number (from 1 to 3)
Method Return:
The required 'Mouse' icon image (null if button outside range 1-3).

2.7.2.5 Create Cursor

2.7.2.5.1 Introduction

This section currently has a single method to create a cross hair cursor.

Method:

Create cross cursor - createCrosshairCursor

2.7.2.5.2 Create cross cursor - createCrosshairCursor

This method creates a cross hair cursor with a central transparent hole. The lines are dashed black and white so that they should be visible on most backgrounds. The cursor size will be 32x32 or 16x16 depending on what can be supported by the underlying system. If both are supported, the larger will be chosen.

Method Definition:
public static Cursor createCrosshairCursor(Toolkit tk, Component c)
Parameters List:
tk
The windowing toolkit.
c
A Component object on which to base the images.
Method Return:
The cross hair cursor

⇑ Up 2   ⇑ Up 1   ⇑ Top of this