@Override public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JobListItem item = (JobListItem) value; item.updateJob(); return item.getItemPanel(); }
/** * Return true if the position provided is on the * * @param position * @return */ public boolean isPositionOnCancelImage(JobListItem jobItem, Point position) { JLabel jobCancelLabel = jobItem.getItemPanel().getJobCancelLabel(); if (jobCancelLabel != null) { return jobCancelLabel.getBounds().contains(position); } else { return false; } }