/** * Gets the height minimum for this axis. This height does not include * any border that will be drawn by the mosaic. */ int getHeightMinimum() { FontMetrics fm = getFontMetrics(getFont()); int height; if (isHorizontal()) { height = fm.getHeight()+fm.getAscent(); if (_label!=null) height += fm.getHeight(); } else { height = 50; if (_label!=null) height = max(height,fm.stringWidth(_label)); } return height; }
private void duringZoom(MouseEvent e) { int xdraw = e.getX(); int ydraw = e.getY(); if (_tile!=null) { drawZoom(_tile,_xdraw,_ydraw,true,true); drawZoom(_tile, xdraw, ydraw,true,true); } else if (_axis!=null) { drawZoom(_axis,_xdraw,_ydraw,_axis.isHorizontal(),_axis.isVertical()); drawZoom(_axis, xdraw, ydraw,_axis.isHorizontal(),_axis.isVertical()); } }
private void paintTrack(int x, int y) { int w = this.getWidth(); int h = this.getHeight(); Graphics g = this.getGraphics(); g.setColor(Color.BLUE); g.setXORMode(this.getBackground()); if (this.isHorizontal()) { g.drawLine(x,-1,x,h); } else { g.drawLine(-1,y,w,y); } g.dispose(); }
private void beginZoom(MouseEvent e) { _xbegin = e.getX(); _ybegin = e.getY(); Object source = e.getSource(); if (source instanceof Tile) { Tile tile = _tile = (Tile)source; drawZoom(tile,_xbegin,_ybegin,true,true); tile.addMouseMotionListener(_mml); } else if (source instanceof TileAxis) { TileAxis axis = _axis = (TileAxis)source; drawZoom(axis,_xbegin,_ybegin,_axis.isHorizontal(),_axis.isVertical()); axis.addMouseMotionListener(_mml); } }
Projector p = (isHorizontal()) ? tile.getHorizontalProjector() : tile.getVerticalProjector(); boolean isHorizontal = isHorizontal(); boolean isTop = isTop(); boolean isLeft = isLeft();
zx = _axis.isHorizontal(); zy = _axis.isVertical(); drawZoom(_axis,_xdraw,_ydraw,zx,zy);
Projector p = (isHorizontal()) ? tile.getHorizontalProjector() : tile.getVerticalProjector(); boolean isHorizontal = isHorizontal(); boolean isVerticalRotated = isVerticalRotated();
if (axis.isHorizontal()) { int jcol = axis.getIndex(); int nrow = mosaic.countRows();