@Test public void testSetVisible() throws Exception { int lid1 = data.createLayer("layer1"); assert data.getLayerVisible(lid1); data.setVisible(lid1, false); assert !data.getLayerVisible(lid1); data.setVisible(lid1, true); assert data.getLayerVisible(lid1); data.undoV(); assert !data.getLayerVisible(lid1); data.undoV(); assert data.getLayerVisible(lid1); data.redoV(); assert !data.getLayerVisible(lid1); data.redoV(); assert data.getLayerVisible(lid1); data.setVisible(lid1, true); data.undoV(); assert !data.getLayerVisible(lid1); }
@Override public final boolean setVisible(int layerId, boolean b) { synchronized (VitcoSettings.SYNC) { boolean result = false; if (dataContainer.layers.containsKey(layerId) && dataContainer.layers.get(layerId).isVisible() != b) { historyManagerV.applyIntent(new LayerVisibilityIntent(layerId, b, false)); notifier.onLayerStateChanged(); result = true; } return result; } }
VoxelData extends AnimationHighlight implements VoxelDataInterface { @Override public final boolean setVisible(int layerId, boolean b) { synchronized (VitcoSettings.SYNC) { boolean result = false; if (dataContainer.layers.containsKey(layerId) && dataContainer.layers.get(layerId).isVisible() != b) { historyManagerV.applyIntent(new LayerVisibilityIntent(layerId, b, false)); notifier.onLayerStateChanged(); result = true; } return result; } } }
VoxelData extends AnimationHighlight implements VoxelDataInterface { @Override public final boolean setVisible(int layerId, boolean b) { synchronized (VitcoSettings.SYNC) { boolean result = false; if (dataContainer.layers.containsKey(layerId) && dataContainer.layers.get(layerId).isVisible() != b) { historyManagerV.applyIntent(new LayerVisibilityIntent(layerId, b, false)); notifier.onLayerStateChanged(); result = true; } return result; } } protected  VoxelData(); }
VoxelData extends AnimationHighlight implements VoxelDataInterface { @Override public final boolean setVisible(int layerId, boolean b) { synchronized (VitcoSettings.SYNC) { boolean result = false; if (dataContainer.layers.containsKey(layerId) && dataContainer.layers.get(layerId).isVisible() != b) { historyManagerV.applyIntent(new LayerVisibilityIntent(layerId, b, false)); notifier.onLayerStateChanged(); result = true; } return result; } } protected  VoxelData(); @Override final int addVoxelDirect(Color color, int[] pos); @Override final int addVoxel(Color color, int[] textureId, int[] pos); @Override final boolean massAddVoxel(Voxel[] voxels); @Override final boolean removeVoxel(int voxelId); @Override final boolean massRemoveVoxel(Integer[] voxelIds); @Override final boolean moveVoxel(int voxelId, int[] newPos); @Override final boolean massMoveVoxel(Voxel[] voxel, int[] shift); @Override final boolean rotateVoxelCenter(Voxel[] voxel, int axe, float degree); @Override final boolean mirrorVoxel(Voxel[] voxel, int axe); @Override final Voxel getVoxel(int voxelId); @Override final boolean setColor(int voxelId, Color color); @Override final boolean massSetColor(Integer[] voxelIds, Color color); @Override final boolean massShiftColor(Integer[] voxelIds, float[] hsbOffset); @Override final Color getColor(int voxelId); @Override final boolean setAlpha(int voxelId, int alpha); @Override final int getAlpha(int voxelId); @Override final int getLayer(int voxelId); @Override final boolean clearV(int layerId); @Override final Voxel searchVoxel(int[] pos, int layerId); @Override final Voxel searchVoxel(int[] pos, boolean onlyCurrentLayer); @Override final boolean setVoxelSelected(int voxelId, boolean selected); @Override final boolean isSelected(int voxelId); @Override final Voxel[][] getNewSelectedVoxel(String requestId); @Override final Voxel[] getSelectedVoxels(); @Override final boolean massSetVoxelSelected(Integer[] voxelIds, boolean selected); @Override final boolean migrateVoxels(Voxel[] voxels); @Override final Voxel[] getLayerVoxels(int layerId); @Override final Voxel[][] getNewVisibleLayerVoxel(String requestId); @Override final Voxel[] getVisibleLayerVoxel(); @Override final boolean anyLayerVoxelVisible(); @Override final boolean anyVoxelSelected(); @Override final void invalidateSideViewBuffer(String requestId, Integer side, Integer plane); @Override final Voxel[][] getNewSideVoxel(String requestId, Integer side, Integer plane); @Override final Voxel[] getVoxelsXY(int z, int layerId); @Override final Voxel[] getVoxelsXZ(int y, int layerId); @Override final Voxel[] getVoxelsYZ(int x, int layerId); @Override final Voxel[] getVoxelsXY(int z); @Override final Voxel[] getVoxelsXZ(int y); @Override final Voxel[] getVoxelsYZ(int x); @Override final int getVoxelCount(int layerId); @Override final void undoV(); @Override final void redoV(); @Override final boolean canUndoV(); @Override final boolean canRedoV(); @Override final int createLayer(String layerName); @Override final boolean deleteLayer(int layerId); @Override final boolean renameLayer(int layerId, String newName); @Override final String getLayerName(int layerId); @Override final String[] getLayerNames(); @Override final boolean selectLayer(int layerId); @Override final boolean selectLayerSoft(int layerId); @Override final int getSelectedLayer(); @Override final Integer[] getLayers(); @Override final boolean setVisible(int layerId, boolean b); @Override final boolean getLayerVisible(int layerId); @Override final boolean moveLayerUp(int layerId); @Override final boolean moveLayerDown(int layerId); @Override final boolean canMoveLayerUp(int layerId); @Override final boolean canMoveLayerDown(int layerId); @Override final boolean mergeVisibleLayers(); @Override final boolean canMergeVisibleLayers(); @Override final void addTexture(BufferedImage image); @Override final boolean removeTexture(int textureId); @Override final boolean removeAllTexture(); @Override final boolean replaceTexture(int textureId, ImageIcon texture); @Override final Integer[] getTextureList(); @Override final TIntHashSet getVoxelColorList(); @Override final ImageIcon getTexture(Integer textureId); @Override final String getTextureHash(Integer textureId); @Override final void selectTexture(int textureId); @Override final void selectTextureSoft(int textureId); @Override final int getSelectedTexture(); @Override final boolean setTexture(int voxelId, int voxelSide, int textureId); @Override final boolean massSetTexture(Integer[] voxelIds, int textureId); @Override final int[] getVoxelTextureIds(int voxelId); @Override final boolean flipVoxelTexture(int voxelId, int voxelSide); @Override final boolean rotateVoxelTexture(int voxelId, int voxelSide); }
VoxelData extends AnimationHighlight implements VoxelDataInterface { @Override public final boolean setVisible(int layerId, boolean b) { synchronized (VitcoSettings.SYNC) { boolean result = false; if (dataContainer.layers.containsKey(layerId) && dataContainer.layers.get(layerId).isVisible() != b) { historyManagerV.applyIntent(new LayerVisibilityIntent(layerId, b, false)); notifier.onLayerStateChanged(); result = true; } return result; } } protected  VoxelData(); @Override final int addVoxelDirect(Color color, int[] pos); @Override final int addVoxel(Color color, int[] textureId, int[] pos); @Override final boolean massAddVoxel(Voxel[] voxels); @Override final boolean removeVoxel(int voxelId); @Override final boolean massRemoveVoxel(Integer[] voxelIds); @Override final boolean moveVoxel(int voxelId, int[] newPos); @Override final boolean massMoveVoxel(Voxel[] voxel, int[] shift); @Override final boolean rotateVoxelCenter(Voxel[] voxel, int axe, float degree); @Override final boolean mirrorVoxel(Voxel[] voxel, int axe); @Override final Voxel getVoxel(int voxelId); @Override final boolean setColor(int voxelId, Color color); @Override final boolean massSetColor(Integer[] voxelIds, Color color); @Override final boolean massShiftColor(Integer[] voxelIds, float[] hsbOffset); @Override final Color getColor(int voxelId); @Override final boolean setAlpha(int voxelId, int alpha); @Override final int getAlpha(int voxelId); @Override final int getLayer(int voxelId); @Override final boolean clearV(int layerId); @Override final Voxel searchVoxel(int[] pos, int layerId); @Override final Voxel searchVoxel(int[] pos, boolean onlyCurrentLayer); @Override final boolean setVoxelSelected(int voxelId, boolean selected); @Override final boolean isSelected(int voxelId); @Override final Voxel[][] getNewSelectedVoxel(String requestId); @Override final Voxel[] getSelectedVoxels(); @Override final boolean massSetVoxelSelected(Integer[] voxelIds, boolean selected); @Override final boolean migrateVoxels(Voxel[] voxels); @Override final Voxel[] getLayerVoxels(int layerId); @Override final Voxel[][] getNewVisibleLayerVoxel(String requestId); @Override final Voxel[] getVisibleLayerVoxel(); @Override final boolean anyLayerVoxelVisible(); @Override final boolean anyVoxelSelected(); @Override final void invalidateSideViewBuffer(String requestId, Integer side, Integer plane); @Override final Voxel[][] getNewSideVoxel(String requestId, Integer side, Integer plane); @Override final Voxel[] getVoxelsXY(int z, int layerId); @Override final Voxel[] getVoxelsXZ(int y, int layerId); @Override final Voxel[] getVoxelsYZ(int x, int layerId); @Override final Voxel[] getVoxelsXY(int z); @Override final Voxel[] getVoxelsXZ(int y); @Override final Voxel[] getVoxelsYZ(int x); @Override final int getVoxelCount(int layerId); @Override final void undoV(); @Override final void redoV(); @Override final boolean canUndoV(); @Override final boolean canRedoV(); @Override final int createLayer(String layerName); @Override final boolean deleteLayer(int layerId); @Override final boolean renameLayer(int layerId, String newName); @Override final String getLayerName(int layerId); @Override final String[] getLayerNames(); @Override final boolean selectLayer(int layerId); @Override final boolean selectLayerSoft(int layerId); @Override final int getSelectedLayer(); @Override final Integer[] getLayers(); @Override final boolean setVisible(int layerId, boolean b); @Override final boolean getLayerVisible(int layerId); @Override final boolean moveLayerUp(int layerId); @Override final boolean moveLayerDown(int layerId); @Override final boolean canMoveLayerUp(int layerId); @Override final boolean canMoveLayerDown(int layerId); @Override final boolean mergeVisibleLayers(); @Override final boolean canMergeVisibleLayers(); @Override final void addTexture(BufferedImage image); @Override final boolean removeTexture(int textureId); @Override final boolean removeAllTexture(); @Override final boolean replaceTexture(int textureId, ImageIcon texture); @Override final Integer[] getTextureList(); @Override final TIntHashSet getVoxelColorList(); @Override final ImageIcon getTexture(Integer textureId); @Override final String getTextureHash(Integer textureId); @Override final void selectTexture(int textureId); @Override final void selectTextureSoft(int textureId); @Override final int getSelectedTexture(); @Override final boolean setTexture(int voxelId, int voxelSide, int textureId); @Override final boolean massSetTexture(Integer[] voxelIds, int textureId); @Override final int[] getVoxelTextureIds(int voxelId); @Override final boolean flipVoxelTexture(int voxelId, int voxelSide); @Override final boolean rotateVoxelTexture(int voxelId, int voxelSide);  }