[system] / trunk / pg / macros / PGbasicmacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PGbasicmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 4097 Revision 4098
1757 # get fileName of applet 1757 # get fileName of applet
1758 my $applet = shift; 1758 my $applet = shift;
1759 my $options = shift; 1759 my $options = shift;
1760 my $archive = $applet ->{archive}; 1760 my $archive = $applet ->{archive};
1761 my $codebase = $applet ->{codebase}; 1761 my $codebase = $applet ->{codebase};
1762 my $code = $applet ->{code};
1762 my $appletHeader = ''; 1763 my $appletHeader = '';
1763 # find location of applet 1764 # find location of applet
1764 1765 if (defined($codebase) and $codebase =~/\S/) {
1765 unless ( $archive ){ 1766 # do nothing
1767 } elsif(defined($archive) and $archive =~/\S/) {
1768 $codebase = findAppletCodebase($archive )
1769 } elsif (defined($code) and $code =~/\S/) {
1770 $codebase = findAppletCodebase($code )
1771 } else {
1766 warn "Must define the achive where the applet code is to be found"; 1772 warn "Must define the achive (.jar file) or code (.class file) where the applet code is to be found";
1767 return; 1773 return;
1768 } 1774 }
1769 $codebase = findAppletFile($archive ) unless defined($codebase); 1775
1770 if ( $codebase =~/^Error/) { 1776 if ( $codebase =~/^Error/) {
1771 warn $codebase; 1777 warn $codebase;
1772 return; 1778 return;
1773 } else { 1779 } else {
1774 1780 # we are set to include the applet
1775 } 1781 }
1776 my $appletHeader = qq! archive = "$archive " codebase = "$codebase" !; 1782 my $appletHeader = qq! archive = "$archive " codebase = "$codebase" !;
1777 foreach my $key ('name', 'code','width','height', ) { 1783 foreach my $key ('name', 'code','width','height', ) {
1778 if ( defined($applet->{$key}) ) { 1784 if ( defined($applet->{$key}) ) {
1779 $appletHeader .= qq! $key = "!.$applet->{$key}.q!" ! ; 1785 $appletHeader .= qq! $key = "!.$applet->{$key}.q!" ! ;
1784 } 1790 }
1785 # add parameters to options 1791 # add parameters to options
1786 if (defined($applet->{params}) ) { 1792 if (defined($applet->{params}) ) {
1787 foreach my $key (keys %{ $applet->{params} }) { 1793 foreach my $key (keys %{ $applet->{params} }) {
1788 my $value = $applet->{params}->{$key}; 1794 my $value = $applet->{params}->{$key};
1789 $options .= qq{< PARAM NAME = $key VALUE = "$value" >\n}; 1795 $options .= qq{<PARAM NAME = "$key" VALUE = "$value" >\n};
1790 } 1796 }
1791 1797
1792 1798
1793 } 1799 }
1794 MODES( TeX => "{\\bf \\underline{APPLET} }".$applet->{name}, 1800 MODES( TeX => "{\\bf \\underline{APPLET} }".$applet->{name},

Legend:
Removed from v.4097  
changed lines
  Added in v.4098

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9