Back to index

wims  3.65+svn20090927
Public Member Functions
fr.ove.openmath.jome.ctrlview.bidim.images.ImagesResourcesManager Class Reference

The resources manager for the images. More...

Inheritance diagram for fr.ove.openmath.jome.ctrlview.bidim.images.ImagesResourcesManager:
Inheritance graph
[legend]
Collaboration diagram for fr.ove.openmath.jome.ctrlview.bidim.images.ImagesResourcesManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ImagesResourcesManager (String resourcesName)
 The Constructor.
String getImageName (String property)
 Returns the name of the image corresponding to the property.
String getHeightFactor (String property)
 Returns the height factor to apply to the orignal size of the image corresponding to the property.
String getBaseline (String property)
 Returns the baseline of the image corresponding to the property.
String getTopInset (String property)
 Returns the top inset of the image corresponding to the property.
String getBottomInset (String property)
 Returns the bottom inset of the image corresponding to the property.
String getLeftInset (String property)
 Returns the left inset of the image corresponding to the property.
String getRightInset (String property)
 Returns the right inset of the image corresponding to the property.
String accessResource (String resource, int index)
 Returns the index-th resource of the specified property.
String getResourceString (String prop)
 Get the raw string for the given property.
String[] getResourceStrings (String prop)
 Get the resource strings for the given property.

Detailed Description

The resources manager for the images.


The syntax for the resources is : imgId = imgName:heightFactor:baseline (Look at the resources file to get full signification of the different fields)

Author:
2000 DIRAT Laurent
Version:
2.0 04/01/2000

Definition at line 41 of file ImagesResourcesManager.java.


Constructor & Destructor Documentation

The Constructor.

Parameters:
resourcesNamethe name of the resources file.

Definition at line 46 of file ImagesResourcesManager.java.

                                                        {
        super(resourcesName);
    }

Member Function Documentation

String fr.ove.utils.CachingResourcesManager.accessResource ( String  resource,
int  index 
) [inline, inherited]

Returns the index-th resource of the specified property.

Parameters:
propertyNamethe name of the property
indexthe index of the resource

Definition at line 40 of file CachingResourcesManager.java.

                                                             {
        String property = null;
        
        if (!cachedResource.equals(resource)) {
            String[] properties = getResourceStrings(resource);
            if ((index >= 0) && (index < properties.length)) {
                property = properties[index];
                cachedResource = resource;
                cachedProperties = properties;
            }
        }
        else if ((index >= 0) && (index < cachedProperties.length))
            property = cachedProperties[index];
        
        return property;
        
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the baseline of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 74 of file ImagesResourcesManager.java.

                                               {
        String baseline = accessResource(property, 2);
        if ((baseline != null) && baseline.equals("null"))
            baseline = null;
            
        return baseline;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the bottom inset of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 98 of file ImagesResourcesManager.java.

                                                  {
        String inset = accessResource(property, 4);
        if ((inset != null) && inset.equals("null"))
            inset = null;
            
        return inset;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the height factor to apply to the orignal size of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 62 of file ImagesResourcesManager.java.

                                                   {
        String heightFactor = accessResource(property, 1);
        if ((heightFactor != null) && heightFactor.equals("null"))
            heightFactor = null;
            
        return heightFactor;
    }    

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the name of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 54 of file ImagesResourcesManager.java.

                                                {
        return accessResource(property, 0);
    }    

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the left inset of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 110 of file ImagesResourcesManager.java.

                                                {
        String inset = accessResource(property, 5);
        if ((inset != null) && inset.equals("null"))
            inset = null;
            
        return inset;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

String fr.ove.utils.ResourcesManager.getResourceString ( String  prop) [inline, inherited]

Get the raw string for the given property.

Definition at line 43 of file ResourcesManager.java.

                                                 {
        String str;
        try {
            str = resources.getString(prop);
        } 
        catch (MissingResourceException mre) {
            str = null;
        }

        return str;
    }

Here is the caller graph for this function:

String [] fr.ove.utils.ResourcesManager.getResourceStrings ( String  prop) [inline, inherited]

Get the resource strings for the given property.

Definition at line 58 of file ResourcesManager.java.

                                                     {
        return tokenize(getResourceString (prop));
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the right inset of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 122 of file ImagesResourcesManager.java.

                                                 {
        String inset = accessResource(property, 6);
        if ((inset != null) && inset.equals("null"))
            inset = null;
            
        return inset;
    }

Here is the call graph for this function:

Here is the caller graph for this function:

Returns the top inset of the image corresponding to the property.

Parameters:
propertythe specified property

Definition at line 86 of file ImagesResourcesManager.java.

                                               {
        String inset = accessResource(property, 3);
        if ((inset != null) && inset.equals("null"))
            inset = null;
            
        return inset;
    }

Here is the call graph for this function:

Here is the caller graph for this function:


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