public void checkDeselection(int minBlockX, int maxBlockX, int minBlockY, int maxBlockY) { GeoCell cell = FrameMain.getInstance().getSelectedGeoCell(); // GeoBlock block; for (GeoBlockEntry e = getHead(), p; (e = e.getNext()) != getTail();) { block = e.getKey(); if (block.getBlockX() < minBlockX || block.getBlockX() >= maxBlockX || block.getBlockY() < minBlockY || block.getBlockY() >= maxBlockY) { if (cell != null && cell.getBlock() == block) { cell = null; FrameMain.getInstance().setSelectedGeoCell(null); } // setStateOf(block.getCells(), SelectionState.NORMAL); p = e.getPrev(); e.remove(); e = p; } } // if (cell == null && hasSelected()) { FrameMain.getInstance().setSelectedGeoCell(getTail().getPrev().getValue().getLastUnsafe()); } }
public override void setNswe(short nswe) { if (FrameMain.getInstance().isSelectedGeoCell(this)) { FrameMain.getInstance().setSelectedGeoCell(this); } }
public override void setNswe(short nswe) { _heightAndNSWE = GeoEngine.updateNSWEOfHeightAndNSWE(_heightAndNSWE, nswe); // if (FrameMain.getInstance().isSelectedGeoCell(this)) { FrameMain.getInstance().setSelectedGeoCell(this); } }
public override void addHeight(short height) { short oldHeight = getHeight(); _height = GeoEngine.getGeoHeightOfHeight((short)(_height + height)); getBlock().updateMinMaxHeight(_height, oldHeight); // if (FrameMain.getInstance().isSelectedGeoCell(this)) { FrameMain.getInstance().setSelectedGeoCell(this); } }
public override void setHeightAndNSWE(short heightAndNSWE) { short oldHeight = getHeight(); _height = GeoEngine.getHeight(heightAndNSWE); // getBlock().updateMinMaxHeight(_height, oldHeight); // if (FrameMain.getInstance().isSelectedGeoCell(this)) { FrameMain.getInstance().setSelectedGeoCell(this); } }
public override void setHeightAndNSWE(short heightAndNSWE) { short oldHeight = getHeight(); _heightAndNSWE = heightAndNSWE; getBlock().updateLayerFor(this); getBlock().updateMinMaxHeight(getHeight(), oldHeight); // if (FrameMain.getInstance().isSelectedGeoCell(this)) { FrameMain.getInstance().setSelectedGeoCell(this); } }
public override void addHeight(short height) { short oldHeight = getHeight(); _heightAndNSWE = GeoEngine.updateHeightOfHeightAndNSWE(_heightAndNSWE, (short)(getHeight() + height)); getBlock().updateLayerFor(this); getBlock().updateMinMaxHeight(getHeight(), oldHeight); // if (FrameMain.getInstance().isSelectedGeoCell(this)) { FrameMain.getInstance().setSelectedGeoCell(this); } }
public void unload() { for (GeoBlockEntry e = getHead(), p; (e = e.getNext()) != getTail();) { p = e.getPrev(); e.remove(); e = p; } // FrameMain f = FrameMain.getInstance(); if (f != null) { f.setSelectedGeoCell(null); } }
private void updateGUI(GeoCell cell) { if (!hasSelected()) { FrameMain.getInstance().setSelectedGeoCell(null); } else { FastArrayList <GeoCell> selected = cell == null ? null : getEntry(cell.getBlock()).getValue(); if (selected == null) { selected = getTail().getPrev().getValue(); } // if (cell != null && selected.contains(cell)) { FrameMain.getInstance().setSelectedGeoCell(cell); } else { FrameMain.getInstance().setSelectedGeoCell(selected.getLastUnsafe()); } } }