当前位置: 首页>>代码示例>>Java>>正文


Java AttributeKey类代码示例

本文整理汇总了Java中org.jhotdraw.draw.AttributeKey的典型用法代码示例。如果您正苦于以下问题:Java AttributeKey类的具体用法?Java AttributeKey怎么用?Java AttributeKey使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AttributeKey类属于org.jhotdraw.draw包,在下文中一共展示了AttributeKey类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: BoundsOutlineHandle

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
/**
 * Creates a bounds outline handle for resizing or transforming a component.
 *
 * @param owner
 */
public BoundsOutlineHandle(Figure owner, //
        AttributeKey<Stroke> stroke1Enabled, AttributeKey<Color> strokeColor1Enabled,//
        AttributeKey<Stroke> stroke2Enabled, AttributeKey<Color> strokeColor2Enabled,//
        AttributeKey<Stroke> stroke1Disabled, AttributeKey<Color> strokeColor1Disabled,//
        AttributeKey<Stroke> stroke2Disabled, AttributeKey<Color> strokeColor2Disabled
        ) {
    super(owner);
    this.stroke1Enabled = stroke1Enabled;
    this.strokeColor1Enabled = strokeColor1Enabled;
    this.stroke2Enabled = stroke2Enabled;
    this.strokeColor2Enabled = strokeColor2Enabled;
    this.stroke1Disabled = stroke1Disabled;
    this.strokeColor1Disabled = strokeColor1Disabled;
    this.stroke2Disabled = stroke2Disabled;
    this.strokeColor2Disabled = strokeColor2Disabled;
    }
 
开发者ID:umple,项目名称:umple,代码行数:22,代码来源:BoundsOutlineHandle.java

示例2: attributeChanged

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
@Override
public void attributeChanged(FigureEvent e) {
    if (e.getSource() == drawing) {
        AttributeKey a = e.getAttribute();
        if (a.equals(CANVAS_HEIGHT) || a.equals(CANVAS_WIDTH)) {
            validateViewTranslation();
            repaint(); // must repaint everything
        }
        if (e.getInvalidatedArea() != null) {
            repaintDrawingArea(e.getInvalidatedArea());
        } else {
            repaintDrawingArea(viewToDrawing(getCanvasViewBounds()));
        }
    } else {
        if (e.getInvalidatedArea() != null) {
            repaintDrawingArea(e.getInvalidatedArea());
        }
    }
}
 
开发者ID:fjug,项目名称:IDDEA,代码行数:20,代码来源:InteractiveDrawingView.java

示例3: AbstractAttributeEditorHandler

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public AbstractAttributeEditorHandler(AttributeKey<T> key, @Nullable Map<AttributeKey, Object> defaultAttributes, AttributeEditor<T> attributeEditor, @Nullable DrawingEditor drawingEditor, boolean updateDrawingEditorDefaults) {
    eventHandler = new EventHandler();
    this.defaultAttributes = (Map<AttributeKey, Object>) ((defaultAttributes == null) ? Collections.emptyMap() : defaultAttributes);
    attributeEditor.setAttributeValue(key.getDefaultValue());
    setAttributeKey(key);
    setAttributeEditor(attributeEditor);
    setEditor(drawingEditor);
    isUpdateDrawingEditorDefaults = updateDrawingEditorDefaults;
}
 
开发者ID:umple,项目名称:umple,代码行数:11,代码来源:AbstractAttributeEditorHandler.java

示例4: setAttributeEnabled

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public void setAttributeEnabled(AttributeKey key, boolean b) {
	super.setAttributeEnabled(key, b);
	for (final BezierFigure figure : figures) {
		figure.setAttributeEnabled(key, b);
	}
}
 
开发者ID:imagej,项目名称:imagej-ui-swing,代码行数:9,代码来源:GeneralPathFigure.java

示例5: setAttributes

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
@Override
public void setAttributes(Map<AttributeKey, Object> map) {
	super.setAttributes(map);
	for (final BezierFigure figure : figures) {
		figure.setAttributes(map);
	}
}
 
开发者ID:imagej,项目名称:imagej-ui-swing,代码行数:9,代码来源:GeneralPathFigure.java

示例6: set

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
/**
 * Sets an attribute of the figure.
 * AttributeKey name and semantics are defined by the class implementing
 * the figure interface.
 */
@Override
public <T> void set(AttributeKey<T> key, T newValue) {
	super.set(key, newValue);
	for (final BezierFigure figure : figures) {
		figure.set(key, newValue);
	}
}
 
开发者ID:imagej,项目名称:imagej-ui-swing,代码行数:13,代码来源:GeneralPathFigure.java

示例7: set

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
private <T> void set(final F fig, final AttributeKey<T> key, final T value) {
	if (MiscUtils.equal(value, fig.get(key))) {
		// NB: Do not trigger an attribute change event if value already matches.
		return;
	}
	fig.set(key, value);
}
 
开发者ID:imagej,项目名称:imagej-ui-swing,代码行数:8,代码来源:AbstractJHotDrawAdapter.java

示例8: UndoableAttributeEdit

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
public UndoableAttributeEdit(Set<Figure> editedFigures, AttributeKey<T> attributeKey, T editRedoValue, LinkedList<Object> editUndoData) {
    this.editedFigures = editedFigures;
    this.attributeKey = attributeKey;
    this.editRedoValue = editRedoValue;
    this.editUndoData = editUndoData;
}
 
开发者ID:umple,项目名称:umple,代码行数:7,代码来源:AbstractAttributeEditorHandler.java

示例9: getAttributeKey

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
public AttributeKey<T> getAttributeKey() {
    return attributeKey;
}
 
开发者ID:umple,项目名称:umple,代码行数:4,代码来源:AbstractAttributeEditorHandler.java

示例10: setAttributeKey

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
public void setAttributeKey(AttributeKey<T> newValue) {
    attributeKey = newValue;
}
 
开发者ID:umple,项目名称:umple,代码行数:4,代码来源:AbstractAttributeEditorHandler.java

示例11: DrawingAttributeEditorHandler

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
public DrawingAttributeEditorHandler(AttributeKey<T> key, AttributeEditor<T> attributeEditor, @Nullable DrawingEditor drawingEditor) {
    super(key, attributeEditor, drawingEditor, false);
}
 
开发者ID:umple,项目名称:umple,代码行数:4,代码来源:DrawingAttributeEditorHandler.java

示例12: FigureAttributeEditorHandler

import org.jhotdraw.draw.AttributeKey; //导入依赖的package包/类
public FigureAttributeEditorHandler(AttributeKey<T> key, AttributeEditor<T> attributeEditor, DrawingEditor drawingEditor) {
    super(key, attributeEditor, drawingEditor);
}
 
开发者ID:umple,项目名称:umple,代码行数:4,代码来源:FigureAttributeEditorHandler.java


注:本文中的org.jhotdraw.draw.AttributeKey类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。