-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2910 from ramsestom/gereric-releasable
add a generic Interface for releasable Components
- Loading branch information
Showing
5 changed files
with
111 additions
and
53 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,36 @@ | ||
package com.codename1.ui; | ||
|
||
/** An Interface that any Component that could be released from the parent Form can implement */ | ||
|
||
public interface IReleasable { | ||
|
||
/** | ||
* Returns true if this is an auto-released Component. | ||
* An Auto-released Component will be disarmed when a drag is happening within it | ||
*/ | ||
public boolean isAutoRelease(); | ||
|
||
/** | ||
* Sets the auto released mode of the Component | ||
*/ | ||
public void setAutoRelease(boolean autoRelease); | ||
|
||
/** | ||
* Indicates a radius in which a pointer release will still have effect. Notice that this only applies to | ||
* pointer release events and not to pointer press events | ||
* @return the releaseRadius | ||
*/ | ||
public int getReleaseRadius(); | ||
|
||
/** | ||
* Indicates a radius in which a pointer release will still have effect. Notice that this only applies to | ||
* pointer release events and not to pointer press events | ||
* @param releaseRadius the releaseRadius to set | ||
*/ | ||
public void setReleaseRadius(int releaseRadius); | ||
|
||
/** | ||
* Function that would be called by the parent Form to put the Component in its released state | ||
*/ | ||
public void setReleased(); | ||
} |
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