/** * */ public boolean isRounded(Map<String, Object> style) { return mxUtils.isTrue(style, mxConstants.STYLE_ROUNDED, false); }
/** * @param properties * @param defaultValue * @return */ public static boolean isTraverseVisible(Map<String, Object> properties, boolean defaultValue) { if (properties != null) { return mxUtils.isTrue(properties, TRAVERSE_VISIBLE, defaultValue); } return false; }
/** * */ public boolean isRounded(Map<String, Object> style) { return mxUtils.isTrue(style, mxConstants.STYLE_ROUNDED, false); }
/** * @param properties * @param defaultValue * @return */ public static boolean isTraverseVisible(Map<String, Object> properties, boolean defaultValue) { if (properties != null) { return mxUtils.isTrue(properties, TRAVERSE_VISIBLE, defaultValue); } return false; }
/** * * @param properties * @return */ public static boolean isDirected(Map<String, Object> properties, boolean defaultValue) { if (properties != null) { return mxUtils.isTrue(properties, DIRECTED, defaultValue); } return false; }
/** * Returns true if the dictionary contains true for the given key or false * if no value is defined for the key. * * @param dict * Dictionary that contains the key, value pairs. * @param key * Key whose value should be returned. * @return Returns the boolean value for key in dict. */ public static boolean isTrue(Map<String, Object> dict, String key) { return isTrue(dict, key, false); }
/** * Returns true if the dictionary contains true for the given key or false * if no value is defined for the key. * * @param dict * Dictionary that contains the key, value pairs. * @param key * Key whose value should be returned. * @return Returns the boolean value for key in dict. */ public static boolean isTrue(Map<String, Object> dict, String key) { return isTrue(dict, key, false); }
/** * * @param properties * @return */ public static boolean isDirected(Map<String, Object> properties, boolean defaultValue) { if (properties != null) { return mxUtils.isTrue(properties, DIRECTED, defaultValue); } return false; }
/** * */ public boolean hasShadow(mxGraphics2DCanvas canvas, mxCellState state) { return mxUtils .isTrue(state.getStyle(), mxConstants.STYLE_SHADOW, false); }
/** * */ public boolean hasShadow(mxGraphics2DCanvas canvas, mxCellState state) { return mxUtils .isTrue(state.getStyle(), mxConstants.STYLE_SHADOW, false); }
/** * */ public void paintShape(mxGraphics2DCanvas canvas, mxCellState state) { super.paintShape(canvas, state); if (mxUtils.isTrue(state.getStyle(), mxConstants.STYLE_GLASS, false)) { drawGlassEffect(canvas, state); } }
/** * */ public void paintShape(mxGraphics2DCanvas canvas, mxCellState state) { super.paintShape(canvas, state); if (mxUtils.isTrue(state.getStyle(), mxConstants.STYLE_GLASS, false)) { drawGlassEffect(canvas, state); } }
/** * */ public void paintShape(mxGraphics2DCanvas canvas, mxCellState state) { super.paintShape(canvas, state); boolean flipH = mxUtils.isTrue(state.getStyle(), mxConstants.STYLE_IMAGE_FLIPH, false); boolean flipV = mxUtils.isTrue(state.getStyle(), mxConstants.STYLE_IMAGE_FLIPV, false); canvas.drawImage(getImageBounds(canvas, state), getImageForStyle(canvas, state), mxGraphics2DCanvas.PRESERVE_IMAGE_ASPECT, flipH, flipV); }
/** * Returns the constant true. This does not use the cloneable field to * return a value for a given cell, it is simply a hook for subclassers * to disallow cloning of individual cells. */ public boolean isCellCloneable(Object cell) { mxCellState state = view.getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : getCellStyle(cell); return isCellsCloneable() && mxUtils.isTrue(style, mxConstants.STYLE_CLONEABLE, true); }
/** * Returns the constant true. This does not use the cloneable field to * return a value for a given cell, it is simply a hook for subclassers * to disallow cloning of individual cells. */ public boolean isCellCloneable(Object cell) { mxCellState state = view.getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : getCellStyle(cell); return isCellsCloneable() && mxUtils.isTrue(style, mxConstants.STYLE_CLONEABLE, true); }
/** * */ public void paintShape(mxGraphics2DCanvas canvas, mxCellState state) { if (configureGraphics(canvas, state, false)) { boolean rounded = mxUtils.isTrue(state.getStyle(), mxConstants.STYLE_ROUNDED, false) && canvas.getScale() > mxConstants.MIN_SCALE_FOR_ROUNDED_LINES; canvas.paintPolyline(createPoints(canvas, state), rounded); } }
/** * Returns true if the given cell is movable. This implementation returns editable. * * @param cell Cell whose editable state should be returned. * @return Returns true if the cell is editable. */ public boolean isCellEditable(Object cell) { mxCellState state = view.getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : getCellStyle(cell); return isCellsEditable() && !isCellLocked(cell) && mxUtils.isTrue(style, mxConstants.STYLE_EDITABLE, true); }
/** * Returns true if the given cell is movable. This implementation returns editable. * * @param cell Cell whose editable state should be returned. * @return Returns true if the cell is editable. */ public boolean isCellEditable(Object cell) { mxCellState state = view.getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : getCellStyle(cell); return isCellsEditable() && !isCellLocked(cell) && mxUtils.isTrue(style, mxConstants.STYLE_EDITABLE, true); }
/** * */ public void paintShape(mxGraphics2DCanvas canvas, mxCellState state) { if (configureGraphics(canvas, state, false)) { boolean rounded = mxUtils.isTrue(state.getStyle(), mxConstants.STYLE_ROUNDED, false) && canvas.getScale() > mxConstants.MIN_SCALE_FOR_ROUNDED_LINES; canvas.paintPolyline(createPoints(canvas, state), rounded); } }
/** * Returns true if the given cell is movable. This implementation * returns movable. * * @param cell Cell whose movable state should be returned. * @return Returns true if the cell is movable. */ public boolean isCellMovable(Object cell) { mxCellState state = view.getState(cell); Map<String, Object> style = (state != null) ? state.getStyle() : getCellStyle(cell); return isCellsMovable() && !isCellLocked(cell) && mxUtils.isTrue(style, mxConstants.STYLE_MOVABLE, true); }