public void mouseClicked(MouseEvent e) { long newRow = getRowPos(e.getY()); long newCol = getColPos(e.getX()); if (e.getButton() == MouseEvent.BUTTON3) { newRow = newRow < 0 ? 0 : newRow; newCol = newCol < 0 ? 0 : newCol; newRow = newRow >= matrixGUIObject.getRowCount() ? matrixGUIObject.getRowCount() - 1 : newRow; newCol = newCol >= matrixGUIObject.getColumnCount() ? matrixGUIObject.getColumnCount() - 1 : newCol; JPopupMenu popup = new MatrixPopupMenu(this, matrixGUIObject, newRow, newCol); popup.show(this, e.getX(), e.getY()); } else if (e.getButton() == MouseEvent.BUTTON1) { // left click: show new window if value is a matrix Object o = matrixGUIObject.getValueAt(newRow, newCol); if (o instanceof Matrix) { ((Matrix) o).showGUI(); } } }
bg.setColor(matrix.getColorAt(row, col)); bg.fillRect((int) (col / xStepSize), (int) (row / yStepSize), 1, 1); if (wasAllDataLoaded && matrix.getValueAt(row, col) == MatrixGUIObject.PRELOADER) { wasAllDataLoaded = false; bufferedImage.getHeight(), null); if (width > 20 && matrix.getRowCount() == 1 && matrix.getColumnCount() == 1) { String s = UJMPFormat.getSingleLineInstance().format(matrix.getValueAt(0, 0)); if (s != null && s.length() > 25) { s = s.substring(0, 25) + "...";
o = matrix.getValueAt(coordinates[0], coordinates[1]); } catch (Exception e) {
final Color col = matrixGUIObject.getColorAt(0, 0); g2d.setColor(ColorUtil.contrastBW(col)); String s = UJMPFormat.getSingleLineInstance().format(matrixGUIObject.getValueAt(0, 0)); if (s != null && s.length() > 25) { s = s.substring(0, 25) + "...";
Object o1 = plotSettings.getMatrixGUIObject().getValueAt((int) row1, (int) column); if (o1 instanceof Matrix) { yv1 = Double.NaN; Object o2 = plotSettings.getMatrixGUIObject().getValueAt((int) row2, (int) column); if (o2 instanceof Matrix) { yv2 = Double.NaN;