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


Java ConstructorProperties类代码示例

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


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

示例1: OSMetrics

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * 
 * This constructor is to be used by internal JMX framework only. User should not try to create an
 * instance of this class.
 */
@ConstructorProperties({"maxFileDescriptorCount", "openFileDescriptorCount", "processCpuTime",
    "committedVirtualMemorySize", "totalPhysicalMemorySize", "freePhysicalMemorySize",
    "totalSwapSpaceSize", "freeSwapSpaceSize", "name", "version", "arch", "availableProcessors",
    "systemLoadAverage"

})
public OSMetrics(long maxFileDescriptorCount, long openFileDescriptorCount, long processCpuTime,
    long committedVirtualMemorySize, long totalPhysicalMemorySize, long freePhysicalMemorySize,
    long totalSwapSpaceSize, long freeSwapSpaceSize, String name, String version, String arch,
    int availableProcessors, double systemLoadAverage) {
  this.maxFileDescriptorCount = maxFileDescriptorCount;
  this.openFileDescriptorCount = openFileDescriptorCount;
  this.processCpuTime = processCpuTime;
  this.committedVirtualMemorySize = committedVirtualMemorySize;
  this.totalPhysicalMemorySize = totalPhysicalMemorySize;
  this.freePhysicalMemorySize = freePhysicalMemorySize;
  this.totalSwapSpaceSize = totalSwapSpaceSize;
  this.freeSwapSpaceSize = freeSwapSpaceSize;
  this.name = name;
  this.version = version;
  this.arch = arch;
  this.availableProcessors = availableProcessors;
  this.systemLoadAverage = systemLoadAverage;

}
 
开发者ID:ampool,项目名称:monarch,代码行数:31,代码来源:OSMetrics.java

示例2: TitledBorder

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Creates a TitledBorder instance with the specified border,
 * title, title-justification, title-position, title-font, and
 * title-color.
 *
 * @param border  the border
 * @param title  the title the border should display
 * @param titleJustification the justification for the title
 * @param titlePosition the position for the title
 * @param titleFont the font of the title
 * @param titleColor the color of the title
 */
@ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"})
public TitledBorder(Border border,
                    String title,
                    int titleJustification,
                    int titlePosition,
                    Font titleFont,
                    Color titleColor) {
    this.title = title;
    this.border = border;
    this.titleFont = titleFont;
    this.titleColor = titleColor;

    setTitleJustification(titleJustification);
    setTitlePosition(titlePosition);

    this.label = new JLabel();
    this.label.setOpaque(false);
    this.label.putClientProperty(BasicHTML.propertyKey, null);
    installPropertyChangeListeners();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:33,代码来源:TitledBorder.java

示例3: DefaultCellEditor

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Constructs a <code>DefaultCellEditor</code> that uses a text field.
 *
 * @param textField  a <code>JTextField</code> object
 */
@ConstructorProperties({"component"})
public DefaultCellEditor(final JTextField textField) {
    editorComponent = textField;
    this.clickCountToStart = 2;
    delegate = new EditorDelegate() {
        public void setValue(Object value) {
            textField.setText((value != null) ? value.toString() : "");
        }

        public Object getCellEditorValue() {
            return textField.getText();
        }
    };
    textField.addActionListener(delegate);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:DefaultCellEditor.java

示例4: TitledBorder

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Creates a TitledBorder instance with the specified border,
 * title, title-justification, title-position, title-font, and
 * title-color.
 *
 * @param border  the border
 * @param title  the title the border should display
 * @param titleJustification the justification for the title
 * @param titlePosition the position for the title
 * @param titleFont the font of the title
 * @param titleColor the color of the title
 */
@ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"})
public TitledBorder(Border border,
                    String title,
                    int titleJustification,
                    int titlePosition,
                    Font titleFont,
                    Color titleColor) {
    this.title = title;
    this.border = border;
    this.titleFont = titleFont;
    this.titleColor = titleColor;

    setTitleJustification(titleJustification);
    setTitlePosition(titlePosition);

    this.label = new JLabel();
    this.label.setOpaque(false);
    this.label.putClientProperty(BasicHTML.propertyKey, null);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:TitledBorder.java

示例5: ScrollPane

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Create a new scrollpane container.
 * @param scrollbarDisplayPolicy policy for when scrollbars should be shown
 * @throws IllegalArgumentException if the specified scrollbar
 *     display policy is invalid
 * @throws HeadlessException if GraphicsEnvironment.isHeadless()
 *     returns true
 * @see java.awt.GraphicsEnvironment#isHeadless
 */
@ConstructorProperties({"scrollbarDisplayPolicy"})
public ScrollPane(int scrollbarDisplayPolicy) throws HeadlessException {
    GraphicsEnvironment.checkHeadless();
    this.layoutMgr = null;
    this.width = 100;
    this.height = 100;
    switch (scrollbarDisplayPolicy) {
        case SCROLLBARS_NEVER:
        case SCROLLBARS_AS_NEEDED:
        case SCROLLBARS_ALWAYS:
            this.scrollbarDisplayPolicy = scrollbarDisplayPolicy;
            break;
        default:
            throw new IllegalArgumentException("illegal scrollbar display policy");
    }

    vAdjustable = new ScrollPaneAdjustable(this, new PeerFixer(this),
                                           Adjustable.VERTICAL);
    hAdjustable = new ScrollPaneAdjustable(this, new PeerFixer(this),
                                           Adjustable.HORIZONTAL);
    setWheelScrollingEnabled(defaultWheelScroll);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:32,代码来源:ScrollPane.java

示例6: ThreadExecutorStats

import java.beans.ConstructorProperties; //导入依赖的package包/类
@ConstructorProperties({"activeThreadCount","currentThreadPoolSize","largestThreadPoolSize",
    "maxThreadPoolSize","currentQueueSize","largestQueueSize","maxQueueSize",
    "completedTaskCount","totalTaskCount","rejectedTaskCount"})
public ThreadExecutorStats(long activeThreadCount, long currentThreadPoolSize,
        long largestThreadPoolSize, long maxThreadPoolSize, long currentQueueSize,
        Long largestQueueSize, long maxQueueSize, long completedTaskCount,
        long totalTaskCount, Long rejectedTaskCount) {
    this.activeThreadCount = activeThreadCount;
    this.currentThreadPoolSize = currentThreadPoolSize;
    this.largestQueueSize = largestQueueSize;
    this.largestThreadPoolSize = largestThreadPoolSize;
    this.maxThreadPoolSize = maxThreadPoolSize;
    this.currentQueueSize = currentQueueSize;
    this.maxQueueSize = maxQueueSize;
    this.completedTaskCount = completedTaskCount;
    this.totalTaskCount = totalTaskCount;
    this.rejectedTaskCount = rejectedTaskCount;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:19,代码来源:ThreadExecutorStats.java

示例7: PluginDescription

import java.beans.ConstructorProperties; //导入依赖的package包/类
@ConstructorProperties({"file", "name", "author", "version", "description", "website"})
public PluginDescription(File file, String name, List<String> author, String version, String description, String website) {
	this.file = file;
	this.name = name;
	this.author = author;
	this.version = version;
	this.description = description;
	this.website = website;
}
 
开发者ID:DivergenceBot,项目名称:UpdateBuilder,代码行数:10,代码来源:PluginDescription.java

示例8: StatisticInformation

import java.beans.ConstructorProperties; //导入依赖的package包/类
@ConstructorProperties ( { "label", "current", "minimum", "maximum" } )
public StatisticInformation ( final String label, final Double current, final Double minimum, final Double maximum )
{
    super ();
    this.label = label;
    this.current = current;
    this.minimum = minimum;
    this.maximum = maximum;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:StatisticInformation.java

示例9: evaluate

import java.beans.ConstructorProperties; //导入依赖的package包/类
public static String[] evaluate(Constructor<?> candidate, int paramCount) {
	ConstructorProperties cp = candidate.getAnnotation(ConstructorProperties.class);
	if (cp != null) {
		String[] names = cp.value();
		if (names.length != paramCount) {
			throw new IllegalStateException("Constructor annotated with @ConstructorProperties but not " +
					"corresponding to actual number of parameters (" + paramCount + "): " + candidate);
		}
		return names;
	}
	else {
		return null;
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:ConstructorResolver.java

示例10: Cursor

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Creates a new cursor object with the specified type.
 * @param type the type of cursor
 * @throws IllegalArgumentException if the specified cursor type
 * is invalid
 */
@ConstructorProperties({"type"})
public Cursor(int type) {
    if (type < Cursor.DEFAULT_CURSOR || type > Cursor.MOVE_CURSOR) {
        throw new IllegalArgumentException("illegal cursor type");
    }
    this.type = type;

    // Lookup localized name.
    name = Toolkit.getProperty(cursorProperties[type][0],
                               cursorProperties[type][1]);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:Cursor.java

示例11: EmptyBorder

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Creates an empty border with the specified insets.
 * @param borderInsets the insets of the border
 */
@ConstructorProperties({"borderInsets"})
public EmptyBorder(Insets borderInsets)   {
    this.top = borderInsets.top;
    this.right = borderInsets.right;
    this.bottom = borderInsets.bottom;
    this.left = borderInsets.left;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:EmptyBorder.java

示例12: BevelBorder

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Creates a bevel border with the specified type, highlight and
 * shadow colors.
 *
 * @param bevelType the type of bevel for the border
 * @param highlightOuterColor the color to use for the bevel outer highlight
 * @param highlightInnerColor the color to use for the bevel inner highlight
 * @param shadowOuterColor the color to use for the bevel outer shadow
 * @param shadowInnerColor the color to use for the bevel inner shadow
 */
@ConstructorProperties({"bevelType", "highlightOuterColor", "highlightInnerColor", "shadowOuterColor", "shadowInnerColor"})
public BevelBorder(int bevelType, Color highlightOuterColor,
                   Color highlightInnerColor, Color shadowOuterColor,
                   Color shadowInnerColor) {
    this(bevelType);
    this.highlightOuter = highlightOuterColor;
    this.highlightInner = highlightInnerColor;
    this.shadowOuter = shadowOuterColor;
    this.shadowInner = shadowInnerColor;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:BevelBorder.java

示例13: DataTreeListenerInfo

import java.beans.ConstructorProperties; //导入依赖的package包/类
@ConstructorProperties({"listener","registeredPath", "isEnabled", "notificationCount"})
public DataTreeListenerInfo(final String listener, final String registeredPath, final boolean isEnabled,
        final long notificationCount) {
    this.listener = Preconditions.checkNotNull(listener);
    this.registeredPath = Preconditions.checkNotNull(registeredPath);
    this.isEnabled = isEnabled;
    this.notificationCount = notificationCount;
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:9,代码来源:DataTreeListenerInfo.java

示例14: processPropertyType

import java.beans.ConstructorProperties; //导入依赖的package包/类
/**
 * Finds the appropriate constructor for the specified type that we will use to construct
 * instances.
 */
private static void processPropertyType(final Class<?> propertyType)
        throws NoSuchMethodException, SecurityException, IntrospectionException {
    final Class<?> wrappedType = Primitives.wrap(propertyType);
    if (CONSTRUCTORS.containsKey(wrappedType)) {
        return;
    }

    // If the type is a primitive (or String type), we look for the constructor that takes a
    // single String argument, which, for primitives, validates and converts from a String
    // representation which is the form we get on ingress.
    if (propertyType.isPrimitive() || Primitives.isWrapperType(propertyType) || propertyType.equals(String.class)) {
        CONSTRUCTORS.put(wrappedType, propertyType.getConstructor(String.class));
    } else {
        // This must be a yang-defined type. We need to find the constructor that takes a
        // primitive as the only argument. This will be used to construct instances to perform
        // validation (eg range checking). The yang-generated types have a couple single-argument
        // constructors but the one we want has the bean ConstructorProperties annotation.
        for (final Constructor<?> ctor: propertyType.getConstructors()) {
            final ConstructorProperties ctorPropsAnnotation = ctor.getAnnotation(ConstructorProperties.class);
            if (ctor.getParameterTypes().length == 1 && ctorPropsAnnotation != null) {
                findYangTypeGetter(propertyType, ctorPropsAnnotation.value()[0]);
                CONSTRUCTORS.put(propertyType, ctor);
                break;
            }
        }
    }
}
 
开发者ID:hashsdn,项目名称:hashsdn-controller,代码行数:32,代码来源:DatastoreContextIntrospector.java

示例15: TitledBorderUIResource

import java.beans.ConstructorProperties; //导入依赖的package包/类
@ConstructorProperties({"border", "title", "titleJustification", "titlePosition", "titleFont", "titleColor"})
public TitledBorderUIResource(Border border,
                String title,
                int titleJustification,
                int titlePosition,
                Font titleFont,
                Color titleColor)       {
    super(border, title, titleJustification, titlePosition, titleFont, titleColor);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:BorderUIResource.java


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