Graphical icons are
applied to the background image of
the graphic view to represent the Navigator items. Customize the graphic
view by applying icon graphics of your choosing rather than those
from the Navigator view. For example, you might want to use your company
logo instead of the to represent the Enterprise.
Before you begin
The procedure has you create the icon images, copy one of
the Cloud Pak System Software
Monitoring Portal style sheets, edit it to reference your
images, then update the graphic view style properties to use the new
style sheet. The new style sheet and icons must be saved on the computer
where the Cloud Pak System Software
Monitoring Portal Server is installed.Create icons
as close to 32 x 32 pixels (large_icon_) or 20 x 20 pixels (small_icon_)
as possible. An image greater or smaller will be resized to those
dimensions automatically and might look distorted. Also, the image
will retain proper proportions only if it is the same height and width.
For example, if your original icon is 76 x 54, resize it to fit 32
x 32 if you will be using one of the large icon style sheets.
Small
icons are used in conjunction with the "small" stylesheets. The graphic
itself should be no taller than 16 x 16 pixels with a 2-pixel top
and bottom margin, for a total of 20 x 20 pixels. The 2-pixel margins
ensure that the icon does not "touch" the one above or below it.
Procedure
- Create the images:
- Create
a one-word (all lowercase if the portal server
is on Linux or UNIX)
.gif or .jpg image file for every Navigator item icon you want to
change in the graphic view.
Use only ASCII characters in the filename. Names that use
characters outside the ASCII code range will not be displayed in the
list of available files when the user browses to select one.
- On
the computer where the portal server is installed,
copy the images:
Install_dir\cnb\classes\candle\fw\resources\icons\user
Install_dir/cw/classes/candle/fw/resources/icons/user
- Create a style sheet:
- Change to the Navigator view whose graphic
view icons
you plan to change.
Having the Navigator open while you
type the item names in the style sheet ensures their correct spelling
and letter casing.
- Identify the Tivoli
style sheet most like the one you
want. It must be one of the large_icon_ or small_icon_ style sheets
(not shape_ or parent_).
The style sheet controls the color,
size and position of the text labels (Navigator item names), as well
as any icons you do not replace with custom icons.
- Make a copy of the style sheet from the following directory,
giving it a one-word name that identifies it as one that you customized,
and place it in the child directory (user):
Install_dir\cnb\classes\candle\fw\resources\styles
Install_dir/cw/classes/candle/fw/resources/styles
- Open your new style sheet in a text editor.
- Edit the @import lines at the top
of the file
to insert ../ in front of the $.
Example:
@import “../$base.css”; @import “../$baseLargeIcon.ss”;
@import “../$baseNodeLabelBottom.css”;
- Copy and paste the following entry at the
end of the
file, one line for each Navigator item whose graphic view icon you
want to change.
node[name = “My Item Name”]{iconImage: url(../../icons/user/iconname.gif);}
- Replace
Your Item Name Here
with
the
exact name of the Navigator item; and replace iconname.gif
with
the exact name of the icon graphic file. Be careful to
follow the syntax exactly. Any errors, such as missing or extra parentheses,
quotation marks, or misspellings will give unpredictable results. The symptom
might be that your style sheet change did not affect the graphic view
or the view contents disappear.
- Save
the text file.
- Apply the
new style sheet:
- Open the workspace that
contains the graphic view or
add a graphic view to the current workspace.
-
In the graphic view title bar, clickProperties.
-
In the Style tab, click the plot
area of the thumbnail graphic.
- Adjust
the Background settings
as needed.
- In the Style area,
click Browse,
select the custom style sheet from the Select Name list,
and click OK.
Your style
sheets are displayed as user/style at the end of the list. If you
do not see your style sheet in the list, check that you saved it in
the right directory and that you did not start the name with $. If
you are in browser mode, make sure you added a style entry to $_index.txt
and
that you spelled it correctly. You can drag the border between Preview and Style to
make the preview image larger.
- When
you are finished editing the graphic view properties,
save your changes with Apply to keep the window
open, or OK to close the Properties editor.
What to do next
- When you erase
the background image name (no image selected) or
use a non-map background, you usually need to save the workspace,
switch to another workspace, then return to it to see the correct
icon sizes. This is required whenever the image sizes do not scale
as you expect.
- After you have created a user style sheet and
associated it with
a graphic view, you can make further changes with a text editor and
see the effect without reopening the Properties editor. To do so,
save the changed file, click Reload Stylesheet
to refresh the style sheet and see the new icons.
- If you want
your new style sheet to be applied automatically to
all new graphic views you create, you can make it the default.