java.beans.ConstructorProperties Java Examples
The following examples show how to use
java.beans.ConstructorProperties.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ScrollPane.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example #2
Source File: ScrollPane.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * 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); }
Example #3
Source File: TitledBorder.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example #4
Source File: PartitionAttributesData.java From gemfirexd-oss with Apache License 2.0 | 6 votes |
@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; }
Example #5
Source File: DefaultCellEditor.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * 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); }
Example #6
Source File: DefaultCellEditor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example #7
Source File: DefaultCellEditor.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example #8
Source File: EmptyBorder.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example #9
Source File: FixedPartitionAttributesData.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
@ConstructorProperties( { "name", "primary", "numBucket" }) public FixedPartitionAttributesData(String name, boolean primary, int numBucket) { this.name = name; this.primary = primary; this.numBucket = numBucket; }
Example #10
Source File: BorderUIResource.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@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); }
Example #11
Source File: Marriage.java From MantaroBot with GNU General Public License v3.0 | 5 votes |
@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; }
Example #12
Source File: MantaroObj.java From MantaroBot with GNU General Public License v3.0 | 5 votes |
@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; }
Example #13
Source File: EmptyBorder.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * 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; }
Example #14
Source File: Cursor.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * 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]); }
Example #15
Source File: WorkflowInstanceFilter.java From copper-engine with Apache License 2.0 | 5 votes |
@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; }
Example #16
Source File: PremiumKey.java From MantaroBot with GNU General Public License v3.0 | 5 votes |
@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; }
Example #17
Source File: ServerLoadData.java From gemfirexd-oss with Apache License 2.0 | 5 votes |
@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; }
Example #18
Source File: Simple.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@SqeDescriptorKey("TWO PARAMETERS CONSTRUCTOR Simple") @ConstructorProperties({"unused1", "unused2"}) public Simple(@SqeDescriptorKey("CONSTRUCTOR PARAMETER unused1")int unused1, @SqeDescriptorKey("CONSTRUCTOR PARAMETER unused2")int unused2) { }
Example #19
Source File: PropertyNamesTest.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties({"oldInt"}) public Evolve(int oldInt) { this(oldInt, "defaultString"); }
Example #20
Source File: ColorUIResource.java From Java8CN with Apache License 2.0 | 4 votes |
@ConstructorProperties({"red", "green", "blue"}) public ColorUIResource(int r, int g, int b) { super(r, g, b); }
Example #21
Source File: Test6921644.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties("id") public Owner(int id) { this.id = id; }
Example #22
Source File: LinearGradientPaint.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * Constructs a {@code LinearGradientPaint}. * * @param start the gradient axis start {@code Point2D} in user space * @param end the gradient axis end {@code Point2D} in user space * @param fractions numbers ranging from 0.0 to 1.0 specifying the * distribution of colors along the gradient * @param colors array of colors corresponding to each fractional value * @param cycleMethod either {@code NO_CYCLE}, {@code REFLECT}, * or {@code REPEAT} * @param colorSpace which color space to use for interpolation, * either {@code SRGB} or {@code LINEAR_RGB} * @param gradientTransform transform to apply to the gradient * * @throws NullPointerException * if one of the points is null, * or {@code fractions} array is null, * or {@code colors} array is null, * or {@code cycleMethod} is null, * or {@code colorSpace} is null, * or {@code gradientTransform} is null * @throws IllegalArgumentException * if start and end points are the same points, * or {@code fractions.length != colors.length}, * or {@code colors} is less than 2 in size, * or a {@code fractions} value is less than 0.0 or greater than 1.0, * or the {@code fractions} are not provided in strictly increasing order */ @ConstructorProperties({ "startPoint", "endPoint", "fractions", "colors", "cycleMethod", "colorSpace", "transform" }) public LinearGradientPaint(Point2D start, Point2D end, float[] fractions, Color[] colors, CycleMethod cycleMethod, ColorSpaceType colorSpace, AffineTransform gradientTransform) { super(fractions, colors, cycleMethod, colorSpace, gradientTransform); // check input parameters if (start == null || end == null) { throw new NullPointerException("Start and end points must be" + "non-null"); } if (start.equals(end)) { throw new IllegalArgumentException("Start point cannot equal" + "endpoint"); } // copy the points... this.start = new Point2D.Double(start.getX(), start.getY()); this.end = new Point2D.Double(end.getX(), end.getY()); }
Example #23
Source File: Test6921644.java From hottub with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties("owner") public Category(Owner owner) { this.owner = owner; }
Example #24
Source File: ColorUIResource.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties({"red", "green", "blue"}) public ColorUIResource(int r, int g, int b) { super(r, g, b); }
Example #25
Source File: Described.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
@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 ; }
Example #26
Source File: BaseConnection.java From red5-server-common with Apache License 2.0 | 4 votes |
/** * Creates a new persistent base connection */ @ConstructorProperties(value = { "persistent" }) public BaseConnection() { this(IConnection.Type.PERSISTENT.name().toLowerCase()); }
Example #27
Source File: BorderUIResource.java From JDKSourceCode1.8 with MIT License | 4 votes |
@ConstructorProperties({"lineColor", "thickness"}) public LineBorderUIResource(Color color, int thickness) { super(color, thickness); }
Example #28
Source File: PropertyNamesTest.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties({"oldInt", "newString", "newerList"}) public Evolve(int oldInt, String newString, List<String> newerList) { this.oldInt = oldInt; this.newString = newString; this.newerList = newerList; }
Example #29
Source File: BorderUIResource.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties({"outsideBorder", "insideBorder"}) public CompoundBorderUIResource(Border outsideBorder, Border insideBorder) { super(outsideBorder, insideBorder); }
Example #30
Source File: Test6921644.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@ConstructorProperties("owner") public Category(Owner owner) { this.owner = owner; }