Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Use of "SwingConstants";
 Post subject: Use of "SwingConstants"; Post rating: 0   Post Posted: Mon 30 Mar, 2015, 01:44 
User avatar

User rating: 0
Joined: Fri 06 Mar, 2015, 11:56
Posts: 19
Location: ChinaChina
I'd like to put orderLabel as text on the left of the chart object line, codes as follows:

HLine.setText(order.getLabel() + "_SL", SwingConstants.LEFT);

However, the parameter SwingConstants.LEFT doesn't seem to work. The orderLabel text is still on the

right end of the line.

Thank a lot!


 
The Best Answer  Post subject: Re: Use of "SwingConstants"; Post rating: 0   Post Posted: Mon 30 Mar, 2015, 09:12 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This feature is not supported for this object type.


 
 Post subject: Re: Use of "SwingConstants"; Post rating: 0   Post Posted: Mon 31 Oct, 2016, 17:11 
User avatar

User rating: 0
Joined: Fri 17 Jan, 2014, 18:13
Posts: 72
Location: NetherlandsNetherlands
See: https://www.dukascopy.com/wiki/#Handle_ ... ect_events

In that example it is used with a ILabelChartObject

I cannot get the SwingConstants to work with a label either.

ILabelChartObject bidtekst = factory.createLabel( bidkey, this.bar.getTime(), t );
                bidtekst.setColor( bidkleur );
                bidtekst.setText(
                    String.valueOf( bid ),
                    bidfont,
                    SwingConstants.LEFT
                );
                kaart.add( bidtekst );
               
                ILabelChartObject asktekst = factory.createLabel( askkey, this.bar.getTime(), t );
                asktekst.setColor( askkleur );
                asktekst.setText(
                    String.valueOf( ask ),
                    askfont,
                    SwingConstants.RIGHT
                );
                kaart.add( asktekst );


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com