import java.awt.Checkbox;
import java.awt.CheckboxMenuItem;
import java.awt.Color;
+import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.FontMetrics;
public void mouseMoved(MouseEvent evt)
{
resizePanel = evt.getY() < 10 && evt.getX() < 14;
+ setCursor(Cursor.getPredefinedCursor(
+ resizePanel ? Cursor.S_RESIZE_CURSOR : Cursor.DEFAULT_CURSOR));
int row = getSelectedRow(evt.getY() + scrollOffset);
if (row > -1)
resizePanel = false;
dragEvent = null;
dragCancelled = false;
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
repaint();
ap.annotationPanel.repaint();
}
resizePanel = true;
repaint();
}
+ setCursor(Cursor.getPredefinedCursor(
+ resizePanel ? Cursor.S_RESIZE_CURSOR : Cursor.DEFAULT_CURSOR));
}
@Override
g.translate(0, +scrollOffset);
if (resizePanel)
{
- g.setColor(Color.red);
- g.setPaintMode();
- g.drawLine(2, 8, 5, 2);
- g.drawLine(5, 2, 8, 8);
+ // g.setColor(Color.red);
+ // g.setPaintMode();
+ // g.drawLine(2, 8, 5, 2);
+ // g.drawLine(5, 2, 8, 8);
}
else if (!dragCancelled && dragEvent != null && aa != null)
{
*/
package jalview.appletgui;
-import java.awt.Color;
+import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
addMouseMotionListener(this);
}
+ @Override
public void mousePressed(MouseEvent evt)
{
oldX = evt.getX();
}
+ @Override
public void mouseReleased(MouseEvent evt)
{
active = false;
// }
}
+ @Override
public void mouseEntered(MouseEvent evt)
{
active = true;
+ setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
+
repaint();
}
+ @Override
public void mouseExited(MouseEvent evt)
{
active = false;
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
repaint();
}
+ @Override
public void mouseDragged(MouseEvent evt)
{
active = true;
}
}
+ @Override
public void mouseMoved(MouseEvent evt)
{
}
+ @Override
public void mouseClicked(MouseEvent evt)
{
}
+ @Override
public void paint(Graphics g)
{
- g.setColor(Color.white);
- g.fillRect(0, 0, getSize().width, getSize().height);
- if (active)
- {
- if (image != null)
- {
- g.drawImage(image, getSize().width - 20, 2, this);
- }
- }
+ // g.setColor(Color.white);
+ // g.fillRect(0, 0, getSize().width, getSize().height);
+ // if (active)
+ // {
+ // if (image != null)
+ // {
+ // g.drawImage(image, getSize().width - 20, 2, this);
+ // }
+ // }
}
}
import jalview.util.Platform;
import java.awt.Color;
+import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
{
boolean was = resizePanel;
resizePanel = evt.getY() < adjusterImageHeight && evt.getX() < HEIGHT_ADJUSTER_WIDTH;
+
if (resizePanel != was)
{
+ setCursor(Cursor.getPredefinedCursor(
+ resizePanel ? Cursor.S_RESIZE_CURSOR
+ : Cursor.DEFAULT_CURSOR));
repaint();
}
}
if (resizePanel)
{
- g.drawImage(adjusterImage, 2, 0 - getScrollOffset(), this);
+ // g.drawImage(adjusterImage, 2, 0 - getScrollOffset(), this);
}
else if (dragEvent != null && aa != null)
{
import jalview.api.AlignViewportI;
import java.awt.Color;
+import java.awt.Cursor;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseEvent;
{
if (image != null)
{
- g.drawImage(image, getWidth() - 20, 2, this);
+ // g.drawImage(image, getWidth() - 20, 2, this);
+ setCursor(Cursor.getPredefinedCursor(Cursor.W_RESIZE_CURSOR));
+ }
+ else
+ {
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
}