Comments (8)
TBH it's been a while since I worked on that and I forgot what I ended up doing. I'll check tomorrow.
from controlsfx.
I think 2 aspects would be nice:
- being able to copy the content even if one cannot modify it
- still seeing visually that the content is not modifiable (as of now with the gray background, compared to white)
from controlsfx.
Sounds like a good addition!
Existing functionality should be preserved though to make sure new changes to do not break existing UIs. This can be done by putting new behavior behind the "flag" which is off by default. For example, COPY_READONLY_CONTENT
. If the flag is set, we turn off field's disabled
state and emulate disabled
style.
Even though it is possible just to add this new functionality, I worry about existing apps as the library been out-there for almost 10 years now.
PRs are always welcome! :)
from controlsfx.
I tried the approach to be able to copy it without changing the visual style by creating a custom editor and have a copy-button right next to the text field and have it all wrapped in an HBox. The issue is though that AbstractPropertyEditor
just disables the entire editor control (so in that case the entire HBox) and therefore also the button.
As a quick fix, I did exactly what I mentioned in the question (on my private fork of the library) and only set setEditable(false)
, but the entire lack of visual indication that the property is not editable is a little weird, IMO. So, at the very least, we need to emulate the disabled style.
However, I am not entirely sure if we really need a new flag if we just emulate the disabled style, but I am also not fully aware of the possible consequences of such a change given the age of the library. If we were to add a new flag, where would you suggest adding it? In the Property.Item
interface?
from controlsfx.
To be honest, I'm not sure either - I just worry about the consequences to existing apps.
As for flags, I would do it as a getFlag/setFlag
static methods on PropertySheet
itself to simplify developer access and provide an ability to customize any part of control. Those would get and set values for specified flags into internal static map, which than can be checked by internal code to produce proper behavior. This assumes of course that we want this behavior to be uniform for all instances of the control within the application.
from controlsfx.
In theory, Node's getProperties
/setProperties
can be used but that only allows us to customize specific instance of the control
from controlsfx.
I am currently working on a fix for this issue in a fork but would like other opinions before creating a PR.
Hi @vatbub have you been able to work on it?
from controlsfx.
Thanks, any feedback is welcome. If there is any starting point I am interested in continuing the work.
from controlsfx.
Related Issues (20)
- RangeSlider: Clicking section between handles without dragging the range creates a keyboard trap HOT 1
- RangeSlider: range bar jumps on dragging when orientation is vertical HOT 1
- RangeSlider CSS issue HOT 1
- datetimepicker HOT 1
- Snapshot release fails due to transifex api HOT 3
- Resource bugs within samples
- SearchableComboBox does not show Tooltip HOT 2
- CheckComboBox: IndexOutOfBoundsException on clearChecks() HOT 6
- Why PropertySheet.Item#getPropertyEditorClass return type Optional<Class<? extends PropertyEditor<?>>>
- Spreadsheet cell editor leaks cell values in new row
- TableFilter throws ClassCastException for different Object types in comparison
- 版本: v11.2.0 在频繁点击标签时报:Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: [ fromIndex: -1, toIndex: 0, size: 3 ] HOT 2
- PopOver has infinite layout passes when adding line border with title
- Future : Filterable ListSelectionView
- Custom ContextMenu for SpreadsheetView RowHeader/ColumnHeader
- CheckListView: Listener for checkModelProperty is not called
- seems tableview css not apply to tableview2
- seems tableview css not apply to tableview2
- Bug in HelloGlyphFont.class: Glyph Font page crashes after displaying "ARROW_CIRCLE_O_UP"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from controlsfx.