![]() |
|||
DocumentMapX_AxisGraduationGUI.javaGo to the documentation of this file.00001 /* 00002 * DocumentMapX_AxisGraduationGUI.java 00003 * 00004 * Created on 9 mars 2003, 19:27 00005 */ 00006 00007 package org.net2map.pov.client; 00008 import java.awt.*; 00009 00014 public class DocumentMapX_AxisGraduationGUI 00015 extends DocumentMapAxisGraduationGUI 00016 { 00017 private static org.apache.log4j.Logger logger = 00018 org.apache.log4j.Logger.getLogger(DocumentMapX_AxisGraduationGUI.class.getName()); 00020 public DocumentMapX_AxisGraduationGUI() 00021 { 00022 logger.setLevel((org.apache.log4j.Level)org.apache.log4j.Priority.DEBUG); 00023 logger.warn("Creating..."); 00024 initComponents(); 00025 logger.warn("...Created"); 00026 } 00027 00033 private void initComponents() 00034 { 00035 00036 setBorder(new javax.swing.border.TitledBorder("X")); 00037 this.setLayout ( null ); 00038 } 00039 public void setLimits(long paramLowerLimit, long paramHigherLimit) 00040 { 00041 if(null != higherLimitGraduationLabel) 00042 { 00043 remove(higherLimitGraduationLabel); 00044 } 00045 if(null != lowerLimitGraduationLabel) 00046 { 00047 remove(lowerLimitGraduationLabel); 00048 } 00049 higherLimitGraduationLabel = 00050 new javax.swing.JLabel(associatedDimensionClient.getSubset().toString(paramHigherLimit)); 00051 lowerLimitGraduationLabel = 00052 new javax.swing.JLabel(associatedDimensionClient.getSubset().toString(paramLowerLimit)); 00053 higherLimitGraduationLabel.setLocation(getWidth() - DocumentMapGUI.horizontalMargin - DocumentMapGUI.horizontalLabelMargin,20); 00054 higherLimitGraduationLabel.setLabelFor (this); 00055 higherLimitGraduationLabel.setSize(80, 10); 00056 higherLimitGraduationLabel.setBackground(Color.BLUE); 00057 higherLimitGraduationLabel.setFont (new java.awt.Font(null,java.awt.Font.PLAIN, 9)); 00058 higherLimitGraduationLabel.setLayout(new BorderLayout()); 00059 00060 add(higherLimitGraduationLabel); 00061 lowerLimitGraduationLabel.setLocation( DocumentMapGUI.horizontalMargin + DocumentMapGUI.horizontalLabelMargin,20); 00062 lowerLimitGraduationLabel.setLabelFor (this); 00063 lowerLimitGraduationLabel.setSize(80, 10); 00064 lowerLimitGraduationLabel.setBackground(Color.BLUE); 00065 lowerLimitGraduationLabel.setFont (new java.awt.Font(null,java.awt.Font.PLAIN, 9)); 00066 lowerLimitGraduationLabel.setLayout(new BorderLayout()); 00067 add(lowerLimitGraduationLabel); 00068 this.paintAll (this.getGraphics ()); 00069 this.validate (); 00070 } 00071 00072 00073 public void displayValue(long theValue) 00074 { 00075 logger.warn( "Displaying value " + 00076 theValue + 00077 "\"" + 00078 associatedDimensionClient.getSubset().toString(theValue) + 00079 "\"\t getWidth=" + 00080 getWidth() + 00081 "leftBorderValue=" + 00082 associatedDocumentMapGUI.leftBorderValue + 00083 "rightBorderValue=" + 00084 associatedDocumentMapGUI.rightBorderValue + 00085 " scaledValue=" + 00086 getScaledValue( getWidth () - 2 * DocumentMapGUI.horizontalMargin - DocumentMapGUI.horizontalLabelMargin, 00087 associatedDocumentMapGUI.leftBorderValue, 00088 associatedDocumentMapGUI.rightBorderValue, 00089 theValue ) + DocumentMapGUI.horizontalMargin); 00090 00091 javax.swing.JLabel theLabel = 00092 new javax.swing.JLabel(associatedDimensionClient.getSubset().toString(theValue)); 00093 theLabel.setLocation( 20, 00094 getScaledValue( getWidth () - 2 * DocumentMapGUI.horizontalMargin - DocumentMapGUI.horizontalLabelMargin, 00095 associatedDocumentMapGUI.leftBorderValue, 00096 associatedDocumentMapGUI.rightBorderValue, 00097 theValue ) + DocumentMapGUI.horizontalMargin 00098 ); 00099 theLabel.setLabelFor (this); 00100 theLabel.setSize(100, 10); 00101 theLabel.setBackground(Color.BLUE); 00102 theLabel.setFont (new java.awt.Font(null,java.awt.Font.PLAIN, 9)); 00103 theLabel.setLayout(new BorderLayout()); 00104 add(theLabel); 00105 this.paintAll (this.getGraphics ()); 00106 this.validate (); 00107 } 00108 } |
|||
|
Accueil | Téléchargement | Manuel
| Doc. technique | Sources CVS |
Faq | Nous contacter
©2003 - All Rights Reserved |
|||