public void mouseClicked(MouseEvent e) { if (contents == null) return; Project proj = source instanceof Frame ? ((Frame) source).getProject() : null; HexFrame frame = RomAttributes.getHexFrame(contents, proj); frame.setVisible(true); frame.toFront(); }
@Override public java.awt.Component getCellEditor(Window source, MemContents value) { if (source instanceof Frame) { Project proj = ((Frame) source).getProject(); RomAttributes.register(value, proj); } ContentsCell ret = new ContentsCell(source, value); ret.mouseClicked(null); return ret; }
public void configureMenu(JPopupMenu menu, Project proj) { this.proj = proj; this.frame = proj.getFrame(); this.circState = proj.getCircuitState(); Object attrs = instance.getAttributeSet(); if (attrs instanceof RomAttributes) { ((RomAttributes) attrs).setProject(proj); } boolean enabled = circState != null; edit = createItem(enabled, _("ramEditMenuItem")); clear = createItem(enabled, _("ramClearMenuItem")); load = createItem(enabled, _("ramLoadMenuItem")); save = createItem(enabled, _("ramSaveMenuItem")); menu.addSeparator(); menu.add(edit); menu.add(clear); menu.add(load); menu.add(save); }
@Override HexFrame getHexFrame(Project proj, Instance instance, CircuitState state) { return RomAttributes.getHexFrame(getMemContents(instance), proj); }