Improved plotting capabilities.

This commit is contained in:
Andreas Dräger
2010-09-20 15:10:27 +00:00
parent 59ce3e693b
commit ded074f31b
3 changed files with 33 additions and 17 deletions

View File

@@ -27,7 +27,6 @@ import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.Serializable;
import java.net.URL;
import java.util.Properties;
import java.util.Set;
import java.util.Vector;
@@ -41,7 +40,6 @@ import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JProgressBar;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JWindow;
import javax.swing.KeyStroke;

View File

@@ -122,6 +122,10 @@ public class FunctionArea extends DArea implements Serializable {
notifyNegLog = true;
}
/*
* (non-Javadoc)
* @see javax.swing.JComponent#getToolTipText(java.awt.event.MouseEvent)
*/
@Override
public String getToolTipText(MouseEvent event) {
if (isShowGraphToolTips()) {
@@ -136,6 +140,10 @@ public class FunctionArea extends DArea implements Serializable {
} else return null;
}
/*
* (non-Javadoc)
* @see javax.swing.JComponent#getToolTipLocation(java.awt.event.MouseEvent)
*/
@Override
public Point getToolTipLocation(MouseEvent event) {
if (isShowGraphToolTips()) {

View File

@@ -214,6 +214,17 @@ public class DArea extends JComponent implements DParent, Printable {
return 0;
}
/**
* method returns the maximal y-value which can be displayed in the DArea
*
* @return the maximal y-value
*/
public double getMaxY() {
if (max_y != null)
return max_y.doubleValue();
return 0;
}
// /**
// * method sets the maximal rectangle whioch can be viewed with the
// * DArea. This method can be used if the area is used with scale functions
@@ -248,17 +259,6 @@ public class DArea extends JComponent implements DParent, Printable {
// setMaxY( rect.y + rect.height );
// }
/**
* method returns the maximal y-value which can be displayed in the DArea
*
* @return the maximal y-value
*/
public double getMaxY() {
if (max_y != null)
return max_y.doubleValue();
return 0;
}
/**
* method returns the minimal rectangle which is set as the visible when all
* elements are removed and the area is on auto focus
@@ -310,6 +310,10 @@ public class DArea extends JComponent implements DParent, Printable {
return srect;
}
public DFunction getYScale() {
return measures.y_scale;
}
/**
* returns if the auto grid is switched on
*
@@ -338,6 +342,16 @@ public class DArea extends JComponent implements DParent, Printable {
return auto_focus;
}
/**
* Method to check whether or not this {@link DArea} adds a grid to its
* plot.
*
* @return true if this {@link DArea} shows a grid and false otherwise.
*/
public boolean isShowGrid() {
return grid.isVisible();
}
/**
* paints the DArea by a Graphics object
*
@@ -797,10 +811,6 @@ public class DArea extends JComponent implements DParent, Printable {
measures.x_scale = x_s;
repaint();
}
public DFunction getYScale() {
return measures.y_scale;
}
/**
* sets a new scale function to the y-axis That means that not the standard