Interface ILabelable
- All Known Subinterfaces:
GraphicLayer,VectorLayer
- All Known Implementing Classes:
DefaultGraphicLayer,FLyrVect
public interface ILabelable
This interface enables support for labeling an object such as a layer, but also others, if any. It gives support for detecting if labeling is being applied (
isLabeled() and setIsLabeled()), to manage the labeling strategy (getLabelingStrategy() and setLabelingStrategy). The labeling is performed by the drawLabels(..) method.- Author:
- jaume dominguez faus - jaume.dominguez@iver.es
-
Method Summary
Modifier and TypeMethodDescriptionvoiddrawLabels(BufferedImage image, Graphics2D g, ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, double scale, double dpi) Causes the labels to be drawn.Returns the current labeling strategybooleanReturns true if labels are drawn, or false otherwise.voidprintLabels(Graphics2D g, ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, double scale, org.gvsig.compat.print.PrintAttributes properties) voidsetIsLabeled(boolean isLabeled) Enables or disables the label drawing.voidsetLabelingStrategy(ILabelingStrategy strategy) Sets the new labeling strategy.
-
Method Details
-
isLabeled
boolean isLabeled()Returns true if labels are drawn, or false otherwise.- Returns:
- boolean telling if labels are drawn
-
setIsLabeled
void setIsLabeled(boolean isLabeled) Enables or disables the label drawing.- Parameters:
isLabeled- , if true then labels will be drawn
-
getLabelingStrategy
ILabelingStrategy getLabelingStrategy()Returns the current labeling strategy- Returns:
- ILabelingStrategy
- See Also:
-
setLabelingStrategy
Sets the new labeling strategy. Changes on the results will take effect next time the drawLabels(...) method is invoked.- Parameters:
strategy-
-
drawLabels
void drawLabels(BufferedImage image, Graphics2D g, ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, double scale, double dpi) throws org.gvsig.fmap.dal.exception.ReadException Causes the labels to be drawn. The policy of process is determined by the LabelingStrategy previously set.- Parameters:
image-g-viewPort-cancel-scale-dpi-- Throws:
org.gvsig.fmap.dal.exception.ReadException
-
printLabels
void printLabels(Graphics2D g, ViewPort viewPort, org.gvsig.tools.task.Cancellable cancel, double scale, org.gvsig.compat.print.PrintAttributes properties) throws org.gvsig.fmap.dal.exception.ReadException - Throws:
org.gvsig.fmap.dal.exception.ReadException
-