java - how to change appearance of ContentProposalAdapter -


I'm using a ContentProposalAdapter to auto-complete a textbox, it's okay, but I want to That the format of the font or popup background color, and more, I searched but I did not find any ContentProposalAdapter method to do these things. How can I change the nature of a ContentProposalAdapter?

I have no experience with this Jeff part, but when you check the documentation, You can find the method to openProposalPopup ()

This class provides some overritable ways to allow popups to be manually controlled. However, most implementations remain private.

Open the proposal popup and display the proposals provided by the offer provider. This method comes back immediately, that is, it does not wait for an offer to choose. This method is used by subclasses to explicitly use the opening of the popup. If there is no proposal to show any one, the popup will not open and a beep will appear.

If you check the code for this method, then you should open the

  / ** * Proposal Popup and * display the offers provided by the offer provider. If there is no proposal to show, do not show * popups. This method comes back immediately, that is, it does not wait to open * popups * or offer to be selected. * * @ Ultimate Auto-Activated * Boolean indicates whether the popup was automatically active. If * wrong, no proposal can be shown, when no beep will appear. * / Private Zero openproposal popup (Boolean auto activated) {if (isValid ()) {if (popup == null) {// Check whether any proposal is shown or not RecordCursorPosition (); // Before receiving the proposal should be IContentProposal [] Offer = getProposals (); If (proposals.length & gt; 0) {if (DEBUG) {System.out.println ("open popup by PRESTED EVENT"); // $ NON-NLS-1 $} Record Cursor (); Popup = new ContentProposalPopup (empty, offer); Popup.open (); Popup.getShell () AddDisposeListener (New Disposalizer) {Public Zero Widget Dispensed Event} {popup = null;}}); InternalPopupOpened (); NotifyPopupOpened (); } And if (Auto!) {GetControl () GetDisplay () Beep (); }}}} / ** * Open the offer popup and * display the offers provided by the offer provider. This method comes back immediately, this is it, does not wait for the proposal to choose it. This method is used by the subclasses * to explicitly open the popup. * If there is no proposal to show, the popup will not open and a beep will appear. * / Protected void openProposalPopup () {openProposal popup (wrong); }   

The code creates ContentProposalPopup example, which manages the presence of popup widgets and some other things ().

will override openProposalPopup () and will use its own ContentProposalPopup , you can manage the presence.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -