类java.beans.ConstructorProperties源码实例Demo

下面列出了怎么用java.beans.ConstructorProperties的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: jdk1.8-source-analysis   文件: ScrollPane.java
/**
 * 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);
}
 
源代码2 项目: jdk8u-jdk   文件: TitledBorder.java
/**
 * 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);
}
 
源代码3 项目: JDKSourceCode1.8   文件: DefaultCellEditor.java
/**
 * 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);
}
 
源代码4 项目: openjdk-jdk9   文件: DefaultCellEditor.java
/**
 * 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);
}
 
源代码5 项目: TencentKona-8   文件: DefaultCellEditor.java
/**
 * 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);
}
 
源代码6 项目: gemfirexd-oss   文件: PartitionAttributesData.java
@ConstructorProperties( { "redundantCopies", "totalMaxMemory",
    "totalNumBuckets", "localMaxMemory", "colocatedWith",
    "partitionResolver", "recoveryDelay", "startupRecoveryDelay",
    "partitionListeners" })
public PartitionAttributesData(int redundantCopies, long totalMaxMemory,
    int totalNumBuckets, int localMaxMemory, String colocatedWith,
    String partitionResolver, long recoveryDelay, long startupRecoveryDelay,
    String[] partitionListeners) {

  this.redundantCopies = redundantCopies;
  this.totalMaxMemory = totalMaxMemory;
  this.totalNumBuckets = totalNumBuckets;
  this.localMaxMemory = localMaxMemory;
  this.colocatedWith = colocatedWith;
  this.partitionResolver = partitionResolver;
  this.recoveryDelay = recoveryDelay;
  this.startupRecoveryDelay = startupRecoveryDelay;
  this.partitionListeners = partitionListeners;
 }
 
源代码7 项目: hottub   文件: ScrollPane.java
/**
 * 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);
}
 
源代码8 项目: jdk8u-dev-jdk   文件: BorderUIResource.java
@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);
}
 
@ConstructorProperties( { "name", "primary", "numBucket"

  })
  public FixedPartitionAttributesData(String name, boolean primary,
      int numBucket) {
    this.name = name;
    this.primary = primary;
    this.numBucket = numBucket;
  }
 
源代码10 项目: hottub   文件: EmptyBorder.java
/**
 * 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;
}
 
源代码11 项目: MantaroBot   文件: Marriage.java
@JsonCreator
@ConstructorProperties({"id", "player1", "player2", "data"})
public Marriage(@JsonProperty("id") String id, @JsonProperty("player1") String player1, @JsonProperty("player2") String player2, MarriageData data) {
    this.id = id;
    this.player1 = player1;
    this.player2 = player2;
    this.data = data;
}
 
源代码12 项目: MantaroBot   文件: MantaroObj.java
@ConstructorProperties({"blackListedGuilds", "blackListedUsers", "patreonUsers", "tempbans", "mutes"})
@JsonCreator
public MantaroObj(@JsonProperty("blackListedGuilds") List<String> blackListedGuilds,
                  @JsonProperty("blackListedUsers") List<String> blackListedUsers,
                  @JsonProperty("patreonUsers") List<String> patreonUsers,
                  @JsonProperty("tempBans") Map<String, Long> tempBans,
                  @JsonProperty("mutes") Map<Long, Pair<String, Long>> mutes) {
    this.blackListedGuilds = blackListedGuilds;
    this.blackListedUsers = blackListedUsers;
    this.patreonUsers = patreonUsers;
    this.tempBans = tempBans;
    this.mutes = mutes;
}
 
源代码13 项目: dragonwell8_jdk   文件: EmptyBorder.java
/**
 * 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;
}
 
源代码14 项目: jdk8u-jdk   文件: Cursor.java
/**
 * 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]);
}
 
源代码15 项目: copper-engine   文件: WorkflowInstanceFilter.java
@ConstructorProperties({"states","lastModTS","creationTS","processorPoolId","workflowClassname","max","offset"})
public WorkflowInstanceFilter(List<String> states, HalfOpenTimeInterval lastModTS, HalfOpenTimeInterval creationTS, String processorPoolId, String workflowClassname, int max, int offset) {
    this.states = states;
    this.lastModTS = lastModTS;
    this.creationTS = creationTS;
    this.processorPoolId = processorPoolId;
    this.workflowClassname = workflowClassname;
    this.max = max;
    this.offset = offset;
}
 
源代码16 项目: MantaroBot   文件: PremiumKey.java
@JsonCreator
@ConstructorProperties({"id", "duration", "expiration", "type", "enabled", "owner"})
public PremiumKey(@JsonProperty("id") String id, @JsonProperty("duration") long duration,
                  @JsonProperty("expiration") long expiration, @JsonProperty("type") Type type,
                  @JsonProperty("enabled") boolean enabled, @JsonProperty("owner") String owner, @JsonProperty("data") PremiumKeyData data) {
    this.id = id;
    this.duration = duration;
    this.expiration = expiration;
    this.type = type.ordinal();
    this.enabled = enabled;
    this.owner = owner;
    if (data != null)
        this.data = data;
}
 
源代码17 项目: gemfirexd-oss   文件: ServerLoadData.java
@ConstructorProperties( { "connectionLoad", "subscriberLoad",
    "loadPerConnection", "loadPerSubscriber" })
public ServerLoadData(float connectionLoad, float subscriberLoad,
    float loadPerConnection, float loadPerSubscriber) {
  this.connectionLoad = connectionLoad;
  this.subscriberLoad = subscriberLoad;
  this.loadPerConnection = loadPerConnection;
  this.loadPerSubscriber = loadPerSubscriber;

}
 
@ConstructorProperties({"a", "b", "c", "d"})
public Ambiguous(byte a, short b, int c, long d) {}
 
源代码19 项目: openjdk-jdk8u   文件: Simple.java
@SqeDescriptorKey("TWO PARAMETERS CONSTRUCTOR Simple")
@ConstructorProperties({"unused1", "unused2"})
public Simple(@SqeDescriptorKey("CONSTRUCTOR PARAMETER unused1")int unused1,
        @SqeDescriptorKey("CONSTRUCTOR PARAMETER unused2")int unused2) {
}
 
源代码20 项目: openjdk-8   文件: Described.java
@SqeDescriptorKey("ONE PARAMETER CONSTRUCTOR Described")
@ConstructorProperties({"name", "unused"})
public Described(@SqeDescriptorKey("CONSTRUCTOR PARAMETER name")String name,
        @SqeDescriptorKey("CONSTRUCTOR PARAMETER unused")String unused) {
    this.name = name ;
}
 
源代码21 项目: jdk8u_jdk   文件: PropertyNamesTest.java
@ConstructorProperties({"oldInt", "newString", "newerList"})
public Evolve(int oldInt, String newString, List<String> newerList) {
    this.oldInt = oldInt;
    this.newString = newString;
    this.newerList = newerList;
}
 
源代码22 项目: openjdk-jdk8u-backup   文件: Test6921644.java
@ConstructorProperties("owner")
public Document(Owner owner) {
    this.owner = owner;
}
 
源代码23 项目: openjdk-8   文件: AmbiguousConstructorTest.java
@ConstructorProperties({"b", "c"})
public Unambiguous(short b, int c) {}
 
源代码24 项目: jdk8u-dev-jdk   文件: PropertyNamesTest.java
@ConstructorProperties({"oldInt"})
public Evolve(int oldInt) {
    this(oldInt, "defaultString");
}
 
源代码25 项目: jdk8u-jdk   文件: BasicStroke.java
/**
 * Constructs a new <code>BasicStroke</code> with the specified
 * attributes.
 * @param width the width of this <code>BasicStroke</code>.  The
 *         width must be greater than or equal to 0.0f.  If width is
 *         set to 0.0f, the stroke is rendered as the thinnest
 *         possible line for the target device and the antialias
 *         hint setting.
 * @param cap the decoration of the ends of a <code>BasicStroke</code>
 * @param join the decoration applied where path segments meet
 * @param miterlimit the limit to trim the miter join.  The miterlimit
 *        must be greater than or equal to 1.0f.
 * @param dash the array representing the dashing pattern
 * @param dash_phase the offset to start the dashing pattern
 * @throws IllegalArgumentException if <code>width</code> is negative
 * @throws IllegalArgumentException if <code>cap</code> is not either
 *         CAP_BUTT, CAP_ROUND or CAP_SQUARE
 * @throws IllegalArgumentException if <code>miterlimit</code> is less
 *         than 1 and <code>join</code> is JOIN_MITER
 * @throws IllegalArgumentException if <code>join</code> is not
 *         either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
 * @throws IllegalArgumentException if <code>dash_phase</code>
 *         is negative and <code>dash</code> is not <code>null</code>
 * @throws IllegalArgumentException if the length of
 *         <code>dash</code> is zero
 * @throws IllegalArgumentException if dash lengths are all zero.
 */
@ConstructorProperties({ "lineWidth", "endCap", "lineJoin", "miterLimit", "dashArray", "dashPhase" })
public BasicStroke(float width, int cap, int join, float miterlimit,
                   float dash[], float dash_phase) {
    if (width < 0.0f) {
        throw new IllegalArgumentException("negative width");
    }
    if (cap != CAP_BUTT && cap != CAP_ROUND && cap != CAP_SQUARE) {
        throw new IllegalArgumentException("illegal end cap value");
    }
    if (join == JOIN_MITER) {
        if (miterlimit < 1.0f) {
            throw new IllegalArgumentException("miter limit < 1");
        }
    } else if (join != JOIN_ROUND && join != JOIN_BEVEL) {
        throw new IllegalArgumentException("illegal line join value");
    }
    if (dash != null) {
        if (dash_phase < 0.0f) {
            throw new IllegalArgumentException("negative dash phase");
        }
        boolean allzero = true;
        for (int i = 0; i < dash.length; i++) {
            float d = dash[i];
            if (d > 0.0) {
                allzero = false;
            } else if (d < 0.0) {
                throw new IllegalArgumentException("negative dash length");
            }
        }
        if (allzero) {
            throw new IllegalArgumentException("dash lengths all zero");
        }
    }
    this.width      = width;
    this.cap        = cap;
    this.join       = join;
    this.miterlimit = miterlimit;
    if (dash != null) {
        this.dash = (float []) dash.clone();
    }
    this.dash_phase = dash_phase;
}
 
源代码26 项目: jdk8u-dev-jdk   文件: AmbiguousConstructorTest.java
@ConstructorProperties({"a", "b", "c"})
public Unambiguous(byte a, short b, int c) {}
 
源代码27 项目: jdk8u_jdk   文件: BorderUIResource.java
@ConstructorProperties({"borderInsets"})
public EmptyBorderUIResource(Insets insets) {
    super(insets);
}
 
源代码28 项目: jdk8u-dev-jdk   文件: Test6921644.java
@ConstructorProperties("owner")
public Author(Owner<Author> owner) {
    this.owner = owner;
    this.id = owner.getId();
}
 
源代码29 项目: jdk8u-jdk   文件: Simple.java
@SqeDescriptorKey("TWO PARAMETERS CONSTRUCTOR Simple")
@ConstructorProperties({"unused1", "unused2"})
public Simple(@SqeDescriptorKey("CONSTRUCTOR PARAMETER unused1")int unused1,
        @SqeDescriptorKey("CONSTRUCTOR PARAMETER unused2")int unused2) {
}
 
源代码30 项目: jdk8u60   文件: BorderUIResource.java
@ConstructorProperties({"borderInsets"})
public EmptyBorderUIResource(Insets insets) {
    super(insets);
}
 
 类所在包
 类方法
 同包方法