-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (C) 2024 The VIEWTIFY Development Team | ||
* | ||
* Licensed under the MIT License (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
package viewtify.ui.helper; | ||
|
||
/** | ||
* An interface providing methods to set alignment, orientation, horizontal gap, and vertical gap | ||
* properties. | ||
* | ||
* @param <Self> The type of the implementing class, enabling method chaining. | ||
*/ | ||
public interface BlockHelper<Self extends BlockHelper> extends PropertyAccessHelper { | ||
|
||
/** | ||
* Sets the height property. | ||
* | ||
* @return The implementing class instance for method chaining. | ||
*/ | ||
default Self height(double size) { | ||
property(Type.Height).setValue(size); | ||
|
||
return (Self) this; | ||
} | ||
|
||
/** | ||
* Sets the width property. | ||
* | ||
* @return The implementing class instance for method chaining. | ||
*/ | ||
default Self width(double size) { | ||
property(Type.Width).setValue(size); | ||
|
||
return (Self) this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters