/usr/share/doc/libjgoodies-forms-java/api/com/jgoodies/forms/util/AbstractUnitConverter.html is in libjgoodies-forms-java-doc 1.6.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_33) on Tue Jul 24 10:27:46 CEST 2012 -->
<TITLE>
AbstractUnitConverter (JGoodies Forms 1.6 API)
</TITLE>
<META NAME="date" CONTENT="2012-07-24">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AbstractUnitConverter (JGoodies Forms 1.6 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractUnitConverter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../../com/jgoodies/forms/util/DefaultUnitConverter.html" title="class in com.jgoodies.forms.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/jgoodies/forms/util/AbstractUnitConverter.html" target="_top"><B>FRAMES</B></A>
<A HREF="AbstractUnitConverter.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_com.jgoodies.common.bean.Bean">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.jgoodies.forms.util</FONT>
<BR>
Class AbstractUnitConverter</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by ">com.jgoodies.common.bean.Bean
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.jgoodies.forms.util.AbstractUnitConverter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>com.jgoodies.common.bean.ObservableBean, com.jgoodies.common.bean.ObservableBean2, <A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/jgoodies/forms/util/DefaultUnitConverter.html" title="class in com.jgoodies.forms.util">DefaultUnitConverter</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>AbstractUnitConverter</B><DT>extends com.jgoodies.common.bean.Bean<DT>implements <A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></DL>
</PRE>
<P>
An abstract implementation of the <A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util"><CODE>UnitConverter</CODE></A> interface that
minimizes the effort required to convert font-dependent sizes to pixels.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Revision: 1.8 $</DD>
<DT><B>Author:</B></DT>
<DD>Karsten Lentzsch</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../com/jgoodies/forms/util/DefaultUnitConverter.html" title="class in com.jgoodies.forms.util"><CODE>DefaultUnitConverter</CODE></A>,
<A HREF="../../../../com/jgoodies/forms/layout/Size.html" title="interface in com.jgoodies.forms.layout"><CODE>Size</CODE></A>,
<A HREF="../../../../com/jgoodies/forms/layout/Sizes.html" title="class in com.jgoodies.forms.layout"><CODE>Sizes</CODE></A>,
<A HREF="../../../../serialized-form.html#com.jgoodies.forms.util.AbstractUnitConverter">Serialized Form</A></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_com.jgoodies.common.bean.Bean"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class com.jgoodies.common.bean.Bean</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>changeSupport</CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#AbstractUnitConverter()">AbstractUnitConverter</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#centimeterAsPixel(double, java.awt.Component)">centimeterAsPixel</A></B>(double cm,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</CODE>
<BR>
Converts Centimeters and returns pixels using the resolution of the
given component's graphics object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#centimeterAsPixel(double, int)">centimeterAsPixel</A></B>(double cm,
int dpi)</CODE>
<BR>
Converts Centimeters and returns pixels using the specified resolution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#computeAverageCharWidth(java.awt.FontMetrics, java.lang.String)">computeAverageCharWidth</A></B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/FontMetrics.html?is-external=true" title="class or interface in java.awt">FontMetrics</A> metrics,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> testString)</CODE>
<BR>
Computes and returns the average character width
of the specified test string using the given FontMetrics.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#dialogUnitXAsPixel(int, java.awt.Component)">dialogUnitXAsPixel</A></B>(int dluX,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> c)</CODE>
<BR>
Converts horizontal dialog units and returns pixels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#dialogUnitXAsPixel(int, double)">dialogUnitXAsPixel</A></B>(int dluX,
double dialogBaseUnitsX)</CODE>
<BR>
Converts horizontal dialog units and returns pixels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#dialogUnitYAsPixel(int, java.awt.Component)">dialogUnitYAsPixel</A></B>(int dluY,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> c)</CODE>
<BR>
Converts vertical dialog units and returns pixels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#dialogUnitYAsPixel(int, double)">dialogUnitYAsPixel</A></B>(int dluY,
double dialogBaseUnitsY)</CODE>
<BR>
Converts vertical dialog units and returns pixels.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#getDefaultScreenResolution()">getDefaultScreenResolution</A></B>()</CODE>
<BR>
Computes and returns the default resolution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#getDialogBaseUnitsX(java.awt.Component)">getDialogBaseUnitsX</A></B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</CODE>
<BR>
Gets and returns the horizontal dialog base units.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected abstract double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#getDialogBaseUnitsY(java.awt.Component)">getDialogBaseUnitsY</A></B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</CODE>
<BR>
Gets and returns the vertical dialog base units.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#getScreenResolution(java.awt.Component)">getScreenResolution</A></B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> c)</CODE>
<BR>
Returns the components screen resolution or the default screen
resolution if the component is null or has no toolkit assigned yet.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#inchAsPixel(double, java.awt.Component)">inchAsPixel</A></B>(double in,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</CODE>
<BR>
Converts Inches and returns pixels using the specified resolution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#inchAsPixel(double, int)">inchAsPixel</A></B>(double in,
int dpi)</CODE>
<BR>
Converts Inches and returns pixels using the specified resolution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#millimeterAsPixel(double, java.awt.Component)">millimeterAsPixel</A></B>(double mm,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</CODE>
<BR>
Converts Millimeters and returns pixels using the resolution of the
given component's graphics object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#millimeterAsPixel(double, int)">millimeterAsPixel</A></B>(double mm,
int dpi)</CODE>
<BR>
Converts Millimeters and returns pixels using the specified resolution.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#pointAsPixel(int, java.awt.Component)">pointAsPixel</A></B>(int pt,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</CODE>
<BR>
Converts DTP Points and returns pixels using the resolution of the
given component's graphics object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/jgoodies/forms/util/AbstractUnitConverter.html#pointAsPixel(int, int)">pointAsPixel</A></B>(int pt,
int dpi)</CODE>
<BR>
Converts DTP Points and returns pixels using the specified resolution.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_com.jgoodies.common.bean.Bean"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.jgoodies.common.bean.Bean</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPropertyChangeSupport, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener</CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="AbstractUnitConverter()"><!-- --></A><H3>
AbstractUnitConverter</H3>
<PRE>
public <B>AbstractUnitConverter</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="inchAsPixel(double, java.awt.Component)"><!-- --></A><H3>
inchAsPixel</H3>
<PRE>
public int <B>inchAsPixel</B>(double in,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</PRE>
<DL>
<DD>Converts Inches and returns pixels using the specified resolution.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html#inchAsPixel(double, java.awt.Component)">inchAsPixel</A></CODE> in interface <CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the Inches<DD><CODE>component</CODE> - the component that provides the graphics object
<DT><B>Returns:</B><DD>the given Inches as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="millimeterAsPixel(double, java.awt.Component)"><!-- --></A><H3>
millimeterAsPixel</H3>
<PRE>
public int <B>millimeterAsPixel</B>(double mm,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</PRE>
<DL>
<DD>Converts Millimeters and returns pixels using the resolution of the
given component's graphics object.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html#millimeterAsPixel(double, java.awt.Component)">millimeterAsPixel</A></CODE> in interface <CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mm</CODE> - Millimeters<DD><CODE>component</CODE> - the component that provides the graphics object
<DT><B>Returns:</B><DD>the given Millimeters as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="centimeterAsPixel(double, java.awt.Component)"><!-- --></A><H3>
centimeterAsPixel</H3>
<PRE>
public int <B>centimeterAsPixel</B>(double cm,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</PRE>
<DL>
<DD>Converts Centimeters and returns pixels using the resolution of the
given component's graphics object.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html#centimeterAsPixel(double, java.awt.Component)">centimeterAsPixel</A></CODE> in interface <CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cm</CODE> - Centimeters<DD><CODE>component</CODE> - the component that provides the graphics object
<DT><B>Returns:</B><DD>the given Centimeters as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="pointAsPixel(int, java.awt.Component)"><!-- --></A><H3>
pointAsPixel</H3>
<PRE>
public int <B>pointAsPixel</B>(int pt,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</PRE>
<DL>
<DD>Converts DTP Points and returns pixels using the resolution of the
given component's graphics object.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html#pointAsPixel(int, java.awt.Component)">pointAsPixel</A></CODE> in interface <CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pt</CODE> - DTP Points<DD><CODE>component</CODE> - the component that provides the graphics object
<DT><B>Returns:</B><DD>the given Points as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="dialogUnitXAsPixel(int, java.awt.Component)"><!-- --></A><H3>
dialogUnitXAsPixel</H3>
<PRE>
public int <B>dialogUnitXAsPixel</B>(int dluX,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> c)</PRE>
<DL>
<DD>Converts horizontal dialog units and returns pixels.
Honors the resolution, dialog font size, platform, and l&f.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html#dialogUnitXAsPixel(int, java.awt.Component)">dialogUnitXAsPixel</A></CODE> in interface <CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dluX</CODE> - the horizontal dialog units<DD><CODE>c</CODE> - a Component that provides the font and graphics
<DT><B>Returns:</B><DD>the given horizontal dialog units as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="dialogUnitYAsPixel(int, java.awt.Component)"><!-- --></A><H3>
dialogUnitYAsPixel</H3>
<PRE>
public int <B>dialogUnitYAsPixel</B>(int dluY,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> c)</PRE>
<DL>
<DD>Converts vertical dialog units and returns pixels.
Honors the resolution, dialog font size, platform, and l&f.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html#dialogUnitYAsPixel(int, java.awt.Component)">dialogUnitYAsPixel</A></CODE> in interface <CODE><A HREF="../../../../com/jgoodies/forms/util/UnitConverter.html" title="interface in com.jgoodies.forms.util">UnitConverter</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dluY</CODE> - the vertical dialog units<DD><CODE>c</CODE> - a Component that provides the font and graphics
<DT><B>Returns:</B><DD>the given vertical dialog units as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="getDialogBaseUnitsX(java.awt.Component)"><!-- --></A><H3>
getDialogBaseUnitsX</H3>
<PRE>
protected abstract double <B>getDialogBaseUnitsX</B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</PRE>
<DL>
<DD>Gets and returns the horizontal dialog base units.
Implementations are encouraged to cache previously computed
dialog base units.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>component</CODE> - a Component that provides the font and graphics
<DT><B>Returns:</B><DD>the horizontal dialog base units</DL>
</DD>
</DL>
<HR>
<A NAME="getDialogBaseUnitsY(java.awt.Component)"><!-- --></A><H3>
getDialogBaseUnitsY</H3>
<PRE>
protected abstract double <B>getDialogBaseUnitsY</B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> component)</PRE>
<DL>
<DD>Gets and returns the vertical dialog base units.
Implementations are encouraged to cache previously computed
dialog base units.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>component</CODE> - a Component that provides the font and graphics
<DT><B>Returns:</B><DD>the vertical dialog base units</DL>
</DD>
</DL>
<HR>
<A NAME="inchAsPixel(double, int)"><!-- --></A><H3>
inchAsPixel</H3>
<PRE>
protected static final int <B>inchAsPixel</B>(double in,
int dpi)</PRE>
<DL>
<DD>Converts Inches and returns pixels using the specified resolution.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>in</CODE> - the Inches<DD><CODE>dpi</CODE> - the resolution
<DT><B>Returns:</B><DD>the given Inches as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="millimeterAsPixel(double, int)"><!-- --></A><H3>
millimeterAsPixel</H3>
<PRE>
protected static final int <B>millimeterAsPixel</B>(double mm,
int dpi)</PRE>
<DL>
<DD>Converts Millimeters and returns pixels using the specified resolution.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mm</CODE> - Millimeters<DD><CODE>dpi</CODE> - the resolution
<DT><B>Returns:</B><DD>the given Millimeters as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="centimeterAsPixel(double, int)"><!-- --></A><H3>
centimeterAsPixel</H3>
<PRE>
protected static final int <B>centimeterAsPixel</B>(double cm,
int dpi)</PRE>
<DL>
<DD>Converts Centimeters and returns pixels using the specified resolution.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cm</CODE> - Centimeters<DD><CODE>dpi</CODE> - the resolution
<DT><B>Returns:</B><DD>the given Centimeters as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="pointAsPixel(int, int)"><!-- --></A><H3>
pointAsPixel</H3>
<PRE>
protected static final int <B>pointAsPixel</B>(int pt,
int dpi)</PRE>
<DL>
<DD>Converts DTP Points and returns pixels using the specified resolution.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pt</CODE> - DTP Points<DD><CODE>dpi</CODE> - the resolution in dpi
<DT><B>Returns:</B><DD>the given Points as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="dialogUnitXAsPixel(int, double)"><!-- --></A><H3>
dialogUnitXAsPixel</H3>
<PRE>
protected int <B>dialogUnitXAsPixel</B>(int dluX,
double dialogBaseUnitsX)</PRE>
<DL>
<DD>Converts horizontal dialog units and returns pixels.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dluX</CODE> - the horizontal dialog units<DD><CODE>dialogBaseUnitsX</CODE> - the horizontal dialog base units
<DT><B>Returns:</B><DD>the given dialog base units as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="dialogUnitYAsPixel(int, double)"><!-- --></A><H3>
dialogUnitYAsPixel</H3>
<PRE>
protected int <B>dialogUnitYAsPixel</B>(int dluY,
double dialogBaseUnitsY)</PRE>
<DL>
<DD>Converts vertical dialog units and returns pixels.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dluY</CODE> - the vertical dialog units<DD><CODE>dialogBaseUnitsY</CODE> - the vertical dialog base units
<DT><B>Returns:</B><DD>the given dialog base units as pixels</DL>
</DD>
</DL>
<HR>
<A NAME="computeAverageCharWidth(java.awt.FontMetrics, java.lang.String)"><!-- --></A><H3>
computeAverageCharWidth</H3>
<PRE>
protected double <B>computeAverageCharWidth</B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/FontMetrics.html?is-external=true" title="class or interface in java.awt">FontMetrics</A> metrics,
<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> testString)</PRE>
<DL>
<DD>Computes and returns the average character width
of the specified test string using the given FontMetrics.
The test string shall represent an "average" text.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>metrics</CODE> - used to compute the test string's width<DD><CODE>testString</CODE> - the string that shall represent an "average" text
<DT><B>Returns:</B><DD>the test string's average character width.</DL>
</DD>
</DL>
<HR>
<A NAME="getScreenResolution(java.awt.Component)"><!-- --></A><H3>
getScreenResolution</H3>
<PRE>
protected int <B>getScreenResolution</B>(<A HREF="http://download.oracle.com/javase/1.6.0/docs/api/java/awt/Component.html?is-external=true" title="class or interface in java.awt">Component</A> c)</PRE>
<DL>
<DD>Returns the components screen resolution or the default screen
resolution if the component is null or has no toolkit assigned yet.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - the component to ask for a toolkit
<DT><B>Returns:</B><DD>the component's screen resolution</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultScreenResolution()"><!-- --></A><H3>
getDefaultScreenResolution</H3>
<PRE>
protected int <B>getDefaultScreenResolution</B>()</PRE>
<DL>
<DD>Computes and returns the default resolution.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the default screen resolution</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractUnitConverter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
<A HREF="../../../../com/jgoodies/forms/util/DefaultUnitConverter.html" title="class in com.jgoodies.forms.util"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/jgoodies/forms/util/AbstractUnitConverter.html" target="_top"><B>FRAMES</B></A>
<A HREF="AbstractUnitConverter.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_com.jgoodies.common.bean.Bean">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2002-2012 JGoodies Karsten Lentzsch. All Rights Reserved.
</BODY>
</HTML>
|