On Tue, Feb 28, 2017 at 12:33 AM, xhatti via CodenameOne Discussions <
[email protected]> wrote:

> I totally agree, that the internals shouldnt be visible from the outside.
> But by making the inner SignatureDialogBody class protected and adding a
> protected factory method into the SignatureComponent which just returns a
> new SignatureDialogBody you are able to customize the component and it isnt
> visible to the outside.
>

At this point, even the fact that the SignatureComponent uses a dialog to
enable the editing is an implementation detail.  This could be changed in
the future to use an alternative UI approach, incorporate native
components, or other changes.  I want to be very careful before exposing
any of this.  E.g.  It is much better that people had to copy and paste the
whole component into their own project than that they customize or extend
the component only to find their changes broken in the future.  Public APIs
need to be crafted carefully.


>
> For translations, sure some statics would help alot and would be
> accessable without going into the component itself. Unfortunatly we cant
> use the build in localization mechanism from CN1 cause our localizations
> have a specific pattern and are provided from our server application ad hoc.
>

You should use Codename One localization to localize Codename One
components.  You can still use your own localization strategy for your own
components.  I have just committed a change to make all text in the
SignatureComponent localizable.
https://github.com/codenameone/CodenameOne/commit/2f131991fca5054a074639812e10cb5df4f57caf


>
> Sure you can remove the signature programmaticly but the user isnt able to
> remove it without adding a extra button which calls setSignatureImage(img).
>

The intention is that you add the extra button to clear the signature if
you want that functionality.   With the commit I posted above, I fixed
setSignatureImage so that you can pass null to it to reset it to its
initial state.


Best regards

Steve

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKVuwkY9pidPCbpseR_2%3Dc55L_MdxiggMX7F56wj2dUD7Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to