Draw line with float values possible
Hi,
Using Canvas drawing is possible to draw line with float values.
graphics.drawLine(int,int,int,int);
graphics.drawLine(float,float,float,float);Thanks and regards,
Rakesh.
not possible
graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]
Similar Messages
-
Can j2me draw line with double values.
Hi,
Can any body know how to darw line in j2me with double values.
I don't want use draw Line with int.
Shall i use svg or j2me has solution.
Thanks and regards,
Rakesh.not possible
graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)] -
How no to select lines with NULL values
Hi,
I am not a newbie newbie in SQL but I do not understand why I cannot retrieve the lines where there are null values.
The table observatoire.fiche has 2 columns with default values set to NULL : total_heures, and total_heures_exceptionnelles. These are numeric types columns.
I want not to select lines where :
total_heures equal NULL AND total_heures_exceptionnelles = NULLI have tried this but I do get an "Invalid relational operator" error message.
select a.nom || ' ' || a.prenom d, a.agent_id r
from OBSERVATOIRE.AGENT a, observatoire.fiche b
where a.agent_id = b.agent_id
and b.total_heures NOT NULL AND total_heures_exceptionnelles NOT NULL
group by a.nom, a.prenom, a.agent_id
order by a.nomCould you help me ?
Thank you for your kind answers.Satyaki_De wrote:
I think this is not the good way to do it. Did you check my solution? It should work the same output as your solution.Really ?
test@ORA10G>
test@ORA10G> -- (1)
test@ORA10G> with t as (
2 select 1 as x, 10 as total_heures, null as total_heures_exceptionnelles from dual union all
3 select 1, null, 20 from dual union all
4 select 1, null, null from dual union all
5 select 1, 30, 40 from dual)
6 --
7 select x, total_heures, total_heures_exceptionnelles
8 from t
9 where x = 1
10 AND NOT ( total_heures IS NULL
11 AND
12 total_heures_exceptionnelles IS NULL
13 );
X TOTAL_HEURES TOTAL_HEURES_EXCEPTIONNELLES
1 10
1 20
1 30 40
test@ORA10G>
test@ORA10G> -- (2)
test@ORA10G> with t as (
2 select 1 as x, 10 as total_heures, null as total_heures_exceptionnelles from dual union all
3 select 1, null, 20 from dual union all
4 select 1, null, null from dual union all
5 select 1, 30, 40 from dual)
6 --
7 select x, total_heures, total_heures_exceptionnelles
8 from t
9 where x = 1
10 AND total_heures IS NOT NULL
11 AND total_heures_exceptionnelles IS NOT NULL;
X TOTAL_HEURES TOTAL_HEURES_EXCEPTIONNELLES
1 30 40
test@ORA10G>
test@ORA10G>isotope -
Drawing lines with smooth curves
Hi,
I'm trying to make a map for an underground system in a PC game and I want something similar to the one Transport for London has:
http://www.tfl.gov.uk/assets/downloads/standard-tube-map.gif
I'm a total newbie with Adobe Illustrator, but I'm trying it as I've heard it's what Transport for London uses.
My question is then, what would be the easiest way of accomplishing multiple lines with different colours and smooth curves, like the lines in my reference picture?
Thanks in advance,
MartinMartin,
In addition to what Kurt said, you may draw paths with straight segments and then round the corners afterwards, using Effect>Stylise>Round Corners (you may Object>Expand Appearance to obtain actual roundings). -
How to draw line with width at my will
Dear frineds:
I have following code to draw lines, but I was required:
[1]. draw this line with some required width such as 0.2 or 0.9 or any width at my will
[2]. each line after I draw, when I use mouse to click on it, it will be selected and then I can delete it,
Please advice how to do it or any good example??
Thanks
sunny
package com.draw;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class DrawingArea extends JPanel
Vector angledLines;
Point startPoint = null;
Point endPoint = null;
Graphics g;
public DrawingArea()
angledLines = new Vector();
setPreferredSize(new Dimension(500,500));
MyMouseListener ml = new MyMouseListener();
addMouseListener(ml);
addMouseMotionListener(ml);
setBackground(Color.white);
public void paintComponent(Graphics g)
// automatically called when repaint
super.paintComponent(g);
g.setColor(Color.black);
g.setFont(getFont());
AngledLine line;
if (startPoint != null && endPoint != null)
// draw the current dragged line
g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
// draw all the angled lines
line = (AngledLine)e.nextElement();
g.drawPolyline(line.xPoints, line.yPoints, line.n);
class MyMouseListener extends MouseInputAdapter
public void mousePressed(MouseEvent e)
if (SwingUtilities.isLeftMouseButton(e))
startPoint = e.getPoint();
public void mouseReleased(MouseEvent e)
if (SwingUtilities.isLeftMouseButton(e))
if (startPoint != null)
AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
angledLines.add(line);
startPoint = null;
repaint();
public void mouseDragged(MouseEvent e)
if (SwingUtilities.isLeftMouseButton(e))
if (startPoint != null)
endPoint = e.getPoint();
repaint();
public void mouseClicked( MouseEvent e )
if (g == null)
g = getGraphics();
g.drawRect(10,10,20,20);
class AngledLine
// inner class for angled lines
public int[] xPoints, yPoints;
public int n = 2;
public AngledLine(Point startPoint, Point endPoint, boolean left)
xPoints = new int[n];
yPoints = new int[n];
xPoints[0] = startPoint.x;
xPoints[1] = endPoint.x;
yPoints[0] = startPoint.y;
yPoints[1] = endPoint.y;
/*if (left)
xPoints[1] = startPoint.x;
yPoints[1] = endPoint.y;
else
xPoints[1] = endPoint.x;
yPoints[1] = startPoint.y;
public static void main(String[] args)
JFrame frame = new JFrame("Test angled lines");
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
DrawingArea d = new DrawingArea();
frame.getContentPane().add( d );
frame.pack();
frame.setVisible(true);
}Message was edited by:
sunnymanmansonudevgan wrote:
dear piz tell me how i can read integer from user my email id is [email protected]
foolish, foolish question -
Hi,
I am trying to implement drawing on canvas with two colors, red and blue.
For example, to draw with the mouse "with two colors".
I do not need a filled rectangle.
I am looking into gradient but without any success.
Is there a better way to draw a line with two colors?
I also tried to use BasicStroke, but the line had an inner/outer strokes.
Please help with suggestions.devboris wrote:
..For example, to draw with the mouse "with two colors".
import java.awt.*;
import javax.swing.*;
class GradientLine {
public static void main(String[] args) {
GradientPanel gp = new GradientPanel();
gp.setPreferredSize( new Dimension(600,400) );
JOptionPane.showMessageDialog(null, gp);
class GradientPanel extends JPanel {
public void paintComponent(Graphics g) {
// cast the Graphics objkect to a Graphics2D object
// (G2D includes setPaint() method)
Graphics2D g2 = (Graphics2D)g;
GradientPaint bgPaint = new GradientPaint(
0,
0,
Color.black,
getWidth(),
getHeight(),
Color.white );
g2.setPaint(bgPaint);
g2.fillRect( 0, 0, getWidth(), getHeight() );
GradientPaint fgPaint = new GradientPaint(
0,
0,
Color.yellow,
getWidth(),
getHeight(),
Color.red );
// set the paint to a gradient.
g2.setPaint(fgPaint);
for (int ii=0; ii<getWidth()/10; ii++) {
g2.drawLine( ii*10, 0, ii*10, getHeight() );
for (int ii=0; ii<getHeight()/10; ii++) {
g2.drawLine( 0, ii*15, getWidth(), ii*15 );
} -
Does someone know why all draw fonction like drawArc, drawLine use int instead of float or double? it would not be more precise to draw with float or double?
thxfonction? LOL!
Seriously though, the method you want is java.awt.Graphics2D.draw(Shape) and fill(Shape). You would use it like this:
protected void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D) g; // cast required to get Graphics2D functionality
// Now make a shape, any shape
Shape shape = new Rectangle2D.Double(2.5, 3.0, 30.0, 40.0);
g2.setColor(Color.yellow);
g2.fill(shape);
g2.setColor(Color.black);
g2.draw(shape);
}Hope this helps. -
Running report from command line with multiple value for same parameter
Hey,
I know how to run a report from the command line specifying parameters values each time but I was wondering if someone could tell me how I would go about running the same report multiple times in a batch program but specifying a list of values to pass to a parameter each time.
So for example if a parameter was 'School Number', how could I run a report in a batch program that would pass a school number to the report as a parameter using a list of school numbers generated for a sql statement or something. So if I had 300 school numbers in my list then I would get 300 different reports when the batch program finished.
This leads me to another question. How can I dynamically change the name of the report generated by the batch to use the school number value passed in, so for example if the value 3 was passed in the name would be something like School 3.pdf, if 4 was passed in the name would be School 4.pdf....etc
Any help on this?
ThanksHello,
Bursting and Distribution may help you ....
37 Bursting and Distributing a Report
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_dist.htm
Regards -
Generic data source with float field possible?
Hello,
when creating an generic data source using a view with a float field I get error R8359 (extract structure: You tried to generate an extract structure with the template structure .... This operation failed, because the template structure quantity fields or currency fields, for example, field ... refer to a different table.).
I changed the data element from ATFLV to e.g. FLOAT but it did not help.
SAP hint 335342 deals with this issue, but I just want to use the float number without the unit.
Is this possible or do I need to write a function module?
Best regards
ThomasHi,
you could try to add the unit table and field to your view. When saving the datasource in RSO2, you can choose to hide these fields if you don't want them extracted into BW.
Regards,
Øystein -
Drawing line with button??
Hi all.
Why won't this class draw a line when i click the mouse button. Nothing happens when i click on the panel.
import java.util.*;
import java.awt.*;
import javax.swing.JPanel;
import javax.swing.*;
import javax.swing.Action.*;
import java.awt.event.*;
import java.awt.event.MouseAdapter;
public class DrawingPanel extends JPanel implements Observer
private ViewableEtch etch;
private ClearPanel clear;
public DrawingPanel(ViewableEtch etch, ClearPanel clear)
this.etch = etch;
this.clear = clear;
etch.addView(this);
clear.addView(this);
setLayout(new FlowLayout());
setLayout(new GridLayout(200,200));
//etch.addActionListener(this);
DrawingControl dc = new DrawingControl();
public void update(Observable obs, Object obj)
Views v = (Views)obs;
if (v.getSource() == etch)
//etch.getLineColor();
getGraphics().setColor(etch.getLineColor() );
getGraphics().drawLine(etch.getStartX(), etch.getStartY(), etch.getEndX(), etch.getEndY());
else
v.getSource().equals(clear);
public void mouseClicked(MouseEvent e)
//etch.setLine(new etch(getStartX(), getStartY(), e.getEndX(), e.getEndY()));
getGraphics().drawLine(etch.getStartX(), etch.getStartY(), etch.getEndX(), etch.getEndY());
}thanxThis should work
public class MyPanel extends JPanel implements MouseListener {
public MyPanel() {
addMouseListener(this);
public void mouseClicked(MouseEvent e) {
// Add code here
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
public void mousePressed(MouseEvent e) {}
public void mouseReleased(MouseEvent e) {} -
Draw Line With Arrow between containers in flex
I need to connect multiple containers by drawing arrow . can any one provide me the idea how to do?
Thanks in Advance,
senthil
[email protected]If your containers are within a spark container them self then you could use fxg to draw arrows based on the containers boundaries
eg this code will draw a red arrow:
<Graphic xmlns="http://ns.adobe.com/fxg/2008" version="2"> <!-- Use Use compact syntax with absolute coordinates. --> <Path data=" M 20 0 C 50 0 50 35 20 35 L 15 35 L 15 45 L 0 32 L 15 19 L 15 29 L 20 29 C 44 29 44 6 20 6"> <!-- Define the border color of the arrow. --> <stroke> <SolidColorStroke color="#888888"/> </stroke> <!-- Define the fill for the arrow. --> <fill> <LinearGradient rotation="90"> <GradientEntry color="#000000" alpha="0.8"/> <GradientEntry color="#FFFFFF" alpha="0.8"/> </LinearGradient> </fill> </Path> </Graphic>
you will have to scale the arrow according to your needs -
Dear Gurus
I'm using BEX Query Designer with BI7 and want to hide to result rows that does not contain any values
Can anyone guide me on setting this
Thanks in advance
BR
Saravanan RamasamyHi.
You can use zero suppression.
Goto Query Properties->Rows/Coulumns->Suppres Zeroes->Active
Regards. -
Building folio with 'floating' article possible?
just wondering if it is possible to include an article in a foilio that is not accessable by the traditional 'swipe'?
specifically i want to have a certain page of an article only accessable by using a button (like a "Go To URL"), as opposed to just scrolling down the page.
can i just import this page as another article and then direct a button to it, without it showing up with a horizontal swipe also? or is there another more suitable solution?
as you may be able to tell i am brand new to this software and am trying my hand at a digital magazine for ipad. any response appreciated, thanks!About the only workaround I can come up with is to put that article at the end and mark it as an ad. Make it start on the second page and fill the first page with black so it looks like nothing’s there if anyone swipes into it they won’t see anything. For the button use the navto://articlename#1 command.
Bob -
Hello,
Why this doesn't work ?
create table a (b numeric(1));
alter table a
add constraint b CHECK (b in (0, 1, -1)) ENABLE;
select * from a where b = -1;
I get the following error: java.sql.SQLException: No more data to read from socket
- Through the jdbc client. It happens with the Oracle Client too.
When i change my check constraint to this:
alter table a
add constraint b CHECK (b in (-1, 0, 1)) ENABLE;
It works.
It's a (known) bug ?
Regards,
Franciscohi dear,
I want to upgrade my OMS server 10.2.0.1 to 10.2.0.5
I downloaded the patch 10.2.0.5 and read the README.txt
Part of the README is:
1.2 Enter the following command to extract the installation files:
$ unzip GridControl_10.2.0.5_<platform name>.zip
This command extracts the following files and directory:
|- p3731593_10205_<platform name>.zip
|- 3731596.zip
|- 3822442.zip
|- README.txt
|- doc/
NOTE: <platform name> will be "LINUX" or "Win32" depending on the platform for which you are installing. For installing Enterprise Manager 10g Grid Control Release 5 (10.2.0.5), refer to the Release Notes available in the "doc" directory.
- p3731593_10205_<platform name>.zip is the ZIP file that contains 10.2.0.5 patch set software.
This zip can be used for:
- Upgrading Oracle Management Service Release 2 (10.2.0.x) or higher to Oracle Management Service Release 5 (10.2.0.5)
- Upgrading Oracle Management Repository (sysman schema)
- Upgrading Oracle Management Agent on the host where OMS is running.
NOTE: This will not upgrade the database in which the Management Repository (sysman schema) resides.
- 3731596.zip is for patching Management Agent by staging the patch set. To understand how you can apply the Management Agent 10.2.0.5 patch set, refer to method 2 described in section 4.3.3 "Upgrading Management Agent - Multiple Hosts at a Time" of the Release Notes. The Release Notes can be found in the "doc" directory.
- 3822442.zip is for patching Management Agent by distributing the full patch set. To understand how to apply the Management Agent 10.2.0.5 patch set, refer to method 1 described in section 4.3.3 "Upgrading Management Agent - Multiple Hosts at a Time" of the Release Notes. The Release Notes can be found in the "doc" directory.3731596.zip - by staging
3822442.zip - by distributing
Does the two above have the same function or purpose?
I can not understand the meaning of the two :( . which do you think is the right one for my setup?
Thanks a lot -
Draw lines with a specfic width and color
how to do it?
if given x arrays and y arrays, then connect points.
public void drawLine(int x1, int y1, int x2, int y2)This function doesn't have width and color.thanks.
I met a problem that the color is obtained by
calculating RGB.
color=a*R+b*G+c*B;
a+b+c=1;
How to get it?huh?
Maybe you are looking for
-
Converting a binary string to a number...
Hi guys, I'm trying to convert a binary string into a decimal integer. I'm not sure if LabVIEW has a VI that does that. I haven't found one yet. Basically, say I have the string '0101'. I want to convert that to the value '5'. Or say I'm using hex, I
-
Can I stop a download and get a refund for an iBook purchase ?
Can I stop a download and get a refund for an iBook purchase ?
-
Error when JCO.Sever is called twice
hello guys, i have implemented my on own JCO.Server. My own JCO.Server extends the class JCO.Server and is called by a function with a RFC destination from SAP. When I call my JCO.Server twice with the same function parameters from SAP then my JCOSer
-
Dreamweaver CS6 will not open after Mac Yosemite 10.10.1 update
Just updated to mac Yosemite 10.10.1 and now Dreamweaver will not open
-
Remove Office command for Office 2004
I have just purchased an iMac with OS 10.4.8 and it came with the Test Drive for Office 2004. Every time I open an existing Word document, it automatically switches it and saves it as 2004, and when I want to print, I get the message that I cannot pr